Skip to content

Commit

Permalink
avoid broken browser_uid on IE
Browse files Browse the repository at this point in the history
Internet Explorer 8 (and maybe others) seem to use different
capitalization in the ACCEPT_CHARSET header between "normal" requests
and AJAX requests. This causes a browser UID mismatch and thus an
unecessary reauthentication.
  • Loading branch information
splitbrain committed Oct 18, 2012
1 parent 88f7f7c commit 80b4f37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ function auth_createToken() {
*
* This is neither unique nor unfakable - still it adds some
* security. Using the first part of the IP makes sure
* proxy farms like AOLs are stil okay.
* proxy farms like AOLs are still okay.
*
* @author Andreas Gohr <andi@splitbrain.org>
*
Expand All @@ -313,6 +313,7 @@ function auth_browseruid() {
$uid .= $_SERVER['HTTP_ACCEPT_LANGUAGE'];
$uid .= $_SERVER['HTTP_ACCEPT_CHARSET'];
$uid .= substr($ip, 0, strpos($ip, '.'));
$uid = strtolower($uid);
return md5($uid);
}

Expand Down

0 comments on commit 80b4f37

Please sign in to comment.