Closed (fixed)
Project:
Restrict Login or Role Access by IP Address
Version:
5.x-1.0-beta4
Component:
User interface
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
5 May 2008 at 07:06 UTC
Updated:
10 Jun 2008 at 03:31 UTC
Comments
Comment #1
ymmatt commentedAfter you install the module when you go to the edit user page the options will be: None, Single IP, IP Range
You must choose one of the 3 and then submit the page, you will be taken to a second page to enter the specific IP address/range, once this is done you click submit again and you are done.
If the above process doesn't work please post the following:
Please include as much information as you can: OS, webserver name and version, PHP version, MySQL version, Drupal version, Drupal path, and everything else you might feel is relevant. There is no such thing as a bug report that is too detailed.
Comment #2
ivo72 commentedI have uninstalled an reinstalled the module 3 times just incase that was the issue... but to no avail..
When submitting a single ip address from the user section and then being taken to the next screen where the ip boxes are show I get this error..
"warning: mysql_real_escape_string() expects parameter 1 to be string, array given in D:\Hosting\Anzses\site\includes\database.mysql.inc on line 400."
When trying to remove the ip address from the users edit section I get this error
"user warning: Unknown table 'restrict_by_ip' in where clause query: DELETE FROM _anzsesrestrict_by_ip WHERE
restrict_by_ip.uid = 816 in D:\Hosting\Anzses\site\includes\database.mysql.inc on line 172."
I am using drupal 5.3 on a windows IIS server with php version 4.40 and mysql version 4.1.12a
Comment #3
ymmatt commentedI know what the issue is and will have more time to work on it next week.
I believe that the .install file is not creating the tables correctly (with the db prefix) should be an easy fix.
Comment #4
ivo72 commentedThats great! Look forward to the solution.
Comment #5
ymmatt commentedAfter looking at this again referring to http://drupal.org/node/51220, I can't find anything wrong with the .install file (other than verifying that the tables were installed).
However, I believe that I have isolated the problem to line 240 in the .module file which reads:
It should read:
So that the prefix is added to the WHERE statement.
I won't be able to get to the cvs to submit the patch until later this week, but if you can edit your copy and let me know if it worked that would be great (I don't have any sites that use prefixes).
Comment #6
ymmatt commentedCorrect that, it was line 244.
This bug fix has been submitted to cvs and will be in the next release
Comment #7
ivo72 commentedThanks for ttaking the time to look into this.
Yes this saves the settings now.
Two issues I see. I get the ip range box when I edit user, and If I add in an ip it saves fine now :). But when I click IP range the second range box doesnt appear. It gives errors when I submit, but then on that page the second ip range box appears and I can add the range in and its fine.
Lastly, I made up an ip adress, expecting to get denied, but it let me login regardless? it seemd like drupal is bypassing the ip restriction? Any ideas on this one.
Comment #8
ymmatt commentedBoth of these are separate issues. Just to have a clear issue cue could you submit two more support requests.
Make sure to include all steps to reproduce the issues.
With regards to the second issue, also post what user you are testing this with.
Comment #9
ivo72 commentedIn regards to the second issue once I log in as an authenticated user (no admin privelages) I get this url http://www.anzses.org/index.php?q=node/2&restricted
ane the user is logged and and can view member pages
but it doesnt deny me, no matter what random IP I put in?
Do you need any more info?
Comment #10
ivo72 commentedIn regards to first issue..
If i login as admin, go to search users, find the user with the ip address under the edit menu. If I click IP range, the second box doesnt appear for the range. If i click submi I get these errors
Illegal value for the Restricted range, quad number: 1 must match Restricted IP Address 1.
Fields do not match
Illegal value for the Restricted range, quad number: 2 must match Restricted IP Address 2.
Fields do not match
Illegal value for the Restricted range, quad number: 3 must match Restricted IP Address 3.
Fields do not match
this page (edit user) now shows the second box, you can now enter a second range and it saves fine. (it still doesnt restict the login)
Here are the additonal modules I use...
IMCE 5.x-1.0 Menu Subtree Permissions 5.x-0.x-dev
Node Privacy By Role 5.x-1.x-dev
Private Upload 5.x-1.0-beta6
Remove Nonviewable Menu Items 5.x-1.x-dev
Restrict By IP 5.x-1.0-beta4 T
inyMCE 5.x-1.x-dev The most popular WYSIWYG
User Import
Comment #11
ymmatt commentedPlease post comments number 9 and 10 in separate issues for this module, they are not relevant to this original issue.
Comment #12
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.