Query variables set incorrectly for ip_login_no_cache creating redirect loop

Comments

t-lo’s picture

$url = url($url, array('query' => array('ip_login_no_cache=' . md5(time())), 'absolute' => TRUE));

Should be:

$url = url($url, array('query' => array('ip_login_no_cache' => md5(time())), 'absolute' => TRUE));

t-lo’s picture

StatusFileSize
new86.38 KB

Latest dev version is different but still incorrect:

$url = url($url, array('query' => 'ip_login_no_cache='.md5(time()), 'absolute' => TRUE));

Should be:

$url = url($url, array('query' => array('ip_login_no_cache' => md5(time())), 'absolute' => TRUE));

t-lo’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: ip-login-redirect-loop-2204743-2.patch, failed testing.

t-lo’s picture

Status: Needs work » Needs review
StatusFileSize
new86.38 KB

Status: Needs review » Needs work

The last submitted patch, 5: ip-login-redirect-loop-2204743-5.patch, failed testing.

t-lo’s picture

Status: Needs work » Needs review
StatusFileSize
new701 bytes

was checking out the master branch, hopefully this one will pass :)

markpavlitski’s picture

Title: Redirect loop when variable_get('cache', CACHE_DISABLED) != CACHE_DISABLED » Redirect loop when anonymous page caching is enabled
Assigned: t-lo » Unassigned
Status: Needs review » Needs work

The patch definitely fixes the redirect loop issue, however there can still be cache collisions if there are multiple requests arriving within 1 second.

I'd suggest using something which is session specific, like drupal_get_token() instead of md5(time()).

davidwhthomas’s picture

Status: Needs work » Fixed

Adjusted patch committed, thanks!

Status: Fixed » Closed (fixed)

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