Not sure where the best place for this problem is so I'll start here.

I have global redirect module turned on and I have a url alias which points node/225 to the of the site. I have securepages set such that should be ignored so that the homepage can be accessed via http or https.

Global redirect sees a form post to https://mysite/node/225 and generates a druapl_goto to the homepage. It sets $path as '' (empty string).

During drupal_goto a call is made to hook_drupal_goto_alter which secure pages acts on in securepages_drupal_goto_alter. At this point $path is an empty string. Securepages runs securepages_match('') to see if this page should be ignored. securepages_match runs drupal_match_path passing in the path (still empty string) and the list of ignored pages, one of which is <front> set in the securepages admin screen,

However, drupal_match_path now returns 0, indicating that the path was not matched even though it should have been. securepages_druapal_goto then sets the $options['https'] variable to false and the drupal_goto ends up going to http://mysite instead of https://mysite

Inside the drupal_match_path, the empty $path variable is not changed to 'node/225' but <front> in the patterns string is and this is what is being looked for.

Either securepages needs to convert an empty path string in the ignores variable to the actual frontpage path before sending it to drupal_match_path or drupal_match_path is behaving unexpectedly.

Comments

johnennew’s picture

Issue summary: View changes

corrected some typos

grendzy’s picture

Assigned: Unassigned » grendzy

Thanks for the detailed report.

johnennew’s picture

I think in essence, drupal_goto accepts an empty string in $path and takes that to mean the front page. drupal_match_path does not assume empty string for $path means front page. Maybe it should?

johnennew’s picture

Issue summary: View changes

front was stripped as had tags in it

astonvictor’s picture

Status: Active » 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