Hi,

I can't say I'm 100% on the causes, but here goes.

Problem:
When viewing a URL aliased node on my site, if I refresh the page (actually, click on the address bar, then enter, meaning go to the same URL) I get constantly ping-pong from the secure (https) url to the non-secure, even though the URL is supposed to be secure only (configured according to its url alias in the settings on secure pages).

My configuration:
- my site is running in http://localhost/mytestsite/ . That's the document root.
- the secure page is set to refer /portal/* on the site to https. the url in question is /portal/deposit.
- the above URL is a url alias to node/50 (for example).

Other notes:
- one other important point - I noticed that when I get this ping pong, if I checked that value of $_GET['q'] while in securepages.module, line 14 (in securepages_boot()), I get once "/portal/deposit" and once "node/50" alternating.

I think the key might be related to working with $_GET[q] in securepages_boot(). Why not use $_REQUEST[q]? The value of this is, AFAIK, always the non-"translated" one, non drupal native one.

CommentFileSizeAuthor
#6 issue368686_p1.patch1.26 KBboaz_r

Comments

boaz_r’s picture

An update:

I've tried today to change $_GET['q'] to $_REQUEST['q'] in a couple of locations (specifically, securepages.module, lines 14 and 199). While it resolved the problem of the jumping back and forth to and out of https, it introduced another issue. At least, I think this is what introduced this issue, and it is that forms that were visible in the https pages (didn't check non-https forms), had their "action" set to full path (not relative), and always point to the http version of the site, which resulted in constant error message when clicking "submit" on those forms ("you are viewing a secure page but the form's data is being transmitted to a non-secured url. ok to proceed?").

Boaz.

boaz_r’s picture

Ok, here's the next steps that produce a seemingly complete, working work-around:

edit securepages_form_alter() in securepages.module, line 162 is now commented out ($path = drupal_get_normal_path($path);).
Commenting it prevented from url aliased URLs to be translated and decided that they should NOT be SSLd

gordon’s picture

I have taken a look at this, and when I get more time I will look into this.

The biggest problem is being able to be compatible with the previous versions that use the real path.

If you want to build a patch which implements this and submit it I will gladly look at this.

Gordon.

blender1968’s picture

Hit this too.

Commenting out that line fixed the issue - not sure about ripple elsewhere...

Cheers

boaz_r’s picture

I'll prepare that patch during the weekend, when I have time...

boaz_r’s picture

StatusFileSize
new1.26 KB

weekend came in fast :-)

Gordon, please see attached patch.

TIA!
Boaz.

boaz_r’s picture

Status: Active » Needs review

Gordon?...

astonvictor’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

I'm closing it because the issue was created a long time ago without any further steps.

if you still need it then raise a new one.
thanks