Skip to content

Commit

Permalink
do not use Accept-Encoding in browser UID
Browse files Browse the repository at this point in the history
Since Chrome 37, they send differen accept encodings for POST and GET
requests which will break BrowserUID checks as reported in
cosmocode/dokuwiki-plugin-oauth/issues/3

See https://code.google.com/p/chromium/issues/detail?id=410559 for
official bug report at Google
  • Loading branch information
splitbrain committed Oct 6, 2014
1 parent 8ab9b36 commit 60aca4b
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion inc/auth.php
Expand Up @@ -335,7 +335,6 @@ function auth_browseruid() {
$ip = clientIP(true);
$uid = '';
$uid .= $INPUT->server->str('HTTP_USER_AGENT');
$uid .= $INPUT->server->str('HTTP_ACCEPT_ENCODING');
$uid .= $INPUT->server->str('HTTP_ACCEPT_CHARSET');
$uid .= substr($ip, 0, strpos($ip, '.'));
$uid = strtolower($uid);
Expand Down

2 comments on commit 60aca4b

@dryoo
Copy link
Contributor

@dryoo dryoo commented on 60aca4b Oct 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Good job!

@nicoraynaud
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for this fix !
I was looking for a solution for months !! We even stopped using Chrome or Chromium for that reason !

Please sign in to comment.