Hello,
i'm trying to use this module and i have configured it to only allow a single local ip to be able to login:
192.168.1.123/32
And i have set a redirect url to: node/12
But when a user with another ip tries to login, the logins fails, but the redirect is not "fired".
I'm on Drupal 7.31
I have debugged the code, and variable_get('restrict_by_ip_error_page', '') returns the correct page.
What am i missing / doing wrong?
I can see these entries in the log:
Session closed for admin - Invalid IP. 192.168.1.124
Session opened for admin.
Login attempt failed for admin.
But user is not redirected.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | restrict_by_ip-error_page_redirect_broken-2324503-3.patch | 4.54 KB | rocketeerbkw |
| #2 | restrict_by_ip-error_page_redirect_broken-2324503-1.patch | 1.27 KB | rocketeerbkw |
Comments
Comment #1
jakobdo commentedI changed this code inside: function _restrict_by_ip_login;
to:
And now it works.
Comment #2
rocketeerbkw commentedI've confirmed this is broken in the most recent version. It looks like this has been broken since the port to Drupal 7 unfortunately. I need to write some tests to make sure this doesn't break in the future and then I'll commit the fix.
In the meantime, here's a patch that should get this working for you right now.
Comment #3
rocketeerbkw commentedHere's a patch with tests
Comment #5
rocketeerbkw commentedSince there's no further comments and I'm pretty confident my tests are good, I committed this (with a small typo fix).