Looks like a line of code got missed when refactoring...

securepages_redirect() uses it but does not declare it as global, while securepages_boot() declare $base_url as global but does not use it and calls securepages_redirect().

This is likely the cause of many issues I have seen listed( imagecache urls, form #actions etc...) , adding global definition to that function fixed these issues for me.

Will submit patch shortly.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JimBroad’s picture

Status: Active » Needs review
FileSize
616 bytes
616 bytes

Submitting patches for 6.x-1.8 and 6.x-1.x-dev

ppcc’s picture

subscribing

gordon’s picture

Status: Needs review » Fixed

Thanks I have fixed this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Bartezz’s picture

Hi,

I've applied your patch as I was having problems with image cache.
I'm using secure pages on my webform nodes which works fine if the nodes do not contain any images provides by image cache.
Yet as soon as images are placed via image cache the pages loose their 'lock' after a second of loading (when the image cache image is loaded I presume).

Was hoping this patch would solve it, yet it doesn't in my case.

I should explain that I have not defined 'Non-secure Base URL' or 'Secure Base URL' under admin/build/securepages
The reason for this is that I'm using domain access module and my base url varies from http://one.example.com to http://two.example.com

Not sure where to start in trying to fix this problem.

Regards

Bartezz’s picture

Found a solution to my imagecached images causing problems

My secure pages setup:

- enabled
- checked: Switch back to http pages when there are no matches
- Non-secure Base URL: (nothing)
- Secure Base URL: (nothing)
- checked: Make secure only the listed pages.
- pages: (the pages you want secured)
- Ignore pages:
*/autocomplete/*
*/ajax/*
*/imagecache/*

Special attention for */imagecache/*

This worked for me!

Cheers

mrcharles’s picture

Patch works like a treat - thanks Jim

cangeceiro’s picture

Patch and settings worked for me as well. Is this patch going to get committed?

sillygwailo’s picture

Status: Closed (fixed) » Active

It doesn't look like this patch ever got committed. Re-opening.

For me, this seems to solve the following problem:

  1. load balancer at example.com + web front ends at subdomain1.example.com and subdomain2.example.com
  2. securing the user path means that going to http://subdomain1.example.com/user redirects to https://example.com/user.
  3. expected instead: redirect to https://subdomain1.example.com/user.

Without the patch: #2 happens. With the patch: #3, which is expected, happens.

grub3’s picture

Subscribe.

grendzy’s picture

Status: Active » Closed (fixed)

I believe this patch has been applied to the -dev version. See http://drupalcode.org/viewvc/drupal/contributions/modules/securepages/se...

There hasn't been a new release for a while, so 1.8 doesn't contain this fix. I'm currently working on 7.x port - but once that's finished a new 6.x-1.9 release is next on the roadmap.

thedeed’s picture

Grendzy,
I'm having issues adding the (globalbase_url-6.x-1.x-dev.patch) patch to the Secure Pages-6.x-1.x-dev module. The only thing that is not working is the Images in my Ubercart shopping cart, is when I'm in the cart and the page goes to non secure mode. Could you be so kind to upload me a patched copy of the dev module.
Thanks

grendzy’s picture

If you have the latest dev release (2010-Oct-27) then the patch has already been applied.