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
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.

AttachmentSize
securepages.admin_.inc_.prevent-front-page-toggle.patch502 bytes

#1

sanduhrs - May 30, 2009 - 11:01

See #286333: Blank line in securepages_secure textarea causes Homepage redirection for additional information.

Patch seems reasonable, didn't test it yet.

#2

gordon - July 2, 2009 - 07:40
Status:needs review» needs work

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

adamo - September 21, 2009 - 20:49

Thanks for figuring this out! :)

#4

chaloalvarezj - November 10, 2009 - 04:36

Thank you! you saved my day

 
 

Drupal is a registered trademark of Dries Buytaert.