Front page toggles between HTTP and HTTPS
mkalkbrenner - April 1, 2009 - 15:27
| Project: | Secure Pages |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | mkalkbrenner |
| Status: | needs work |
Jump to:
Description
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.
| Attachment | Size |
|---|---|
| securepages.admin_.inc_.prevent-front-page-toggle.patch | 502 bytes |

#1
See #286333: Blank line in securepages_secure textarea causes Homepage redirection for additional information.
Patch seems reasonable, didn't test it yet.
#2
This looks ok, but you need to add an update which will do fix up the current variables when the update.php is run.
#3
Thanks for figuring this out! :)
#4
Thank you! you saved my day