Closed (fixed)
Project:
Secure Pages
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
1 Apr 2009 at 15:27 UTC
Updated:
17 Feb 2012 at 03:00 UTC
Jump to comment: Most recent file
If pages section at admin/build/securepages contains an empty line (what usually happens if someone hits ENTER after the last record) the front page toggles between HTTP and HTTPS each time you reload. The reason for this is that the empty line gets transformed into an empty or condition for the regular expression that matches urls and the empty or condition matches the front page.
I attached a simple patch that eliminates empty lines at the end of the list of pages when validating the admin form.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 420712.patch | 814 bytes | grendzy |
| securepages.admin_.inc_.prevent-front-page-toggle.patch | 502 bytes | mkalkbrenner |
Comments
Comment #1
sanduhrsSee #286333: Blank line in securepages_secure textarea causes Homepage redirection for additional information.
Patch seems reasonable, didn't test it yet.
Comment #2
gordon commentedThis looks ok, but you need to add an update which will do fix up the current variables when the update.php is run.
Comment #3
adamo commentedThanks for figuring this out! :)
Comment #4
chaloalvarezj commentedThank you! you saved my day
Comment #5
Nathan.Ray-1 commentedLegend! Thanks a bunch!
Comment #6
criznach commentedI believe this was causing a redirect loop in firefox on one of my sites. I removed the trailing newline and it started working immediately.
Comment #7
jleinenbach commentedPatch works. But remove the trailing newline before applying this patch.
Comment #8
LiveWire commentedMUCHOS GRACIAS! Thank you a ton.
Comment #9
buddacan you not just re-save the settings form to have your values trimmed?
obviously the redirection would need to be disabled on the settings form in order to get in to the site :-)
Comment #10
heikwan commentedMy front page still alternates between http and https even after the patch.
Comment #11
mkalkbrennerDid you save your settings again after the patch?
Comment #12
adr_p commentedPlease see http://drupal.org/node/587000#comment-4519010.
Comment #13
grendzy commentedIt seems the front page matching is broken anyway. Here's a new patch:
Comment #14
BMorse commentedI applied this patch on version 6.x-1.9 and it seems to have worked fine. Thanks so much!
Comment #15
grendzy commentedI believe this is fixed in the 6.x-2.x branch. Please test and report back if you can.
Comment #16
grendzy commentedThere have been no further reports of this problem in the 6.x-2.x branch, and we have tests now too.