Invalid Accept-Language header format (multiple quality values)
Reported by
iev...@coxds.com,
Mar 28 2017
|
|||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Steps to reproduce the problem:
We develop RTB platform and noticed lots of ad requests with invalid Accept-Language header.
Example:
en-US,en;q=0.5;q=0.8
All of such the requests has user agent like:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36
with variations of Chrome version and OS version.
What is the expected behavior?
Languages in the header should be comma-separated values with one or zero quality values ("q = ...").
What went wrong?
In the example there are 2 quality values for "en" language, which seems to be invalid Accept-Language header.
Did this work before? N/A
Does this work in other browsers? Yes
Chrome version: 56.0.2924.87 Channel: n/a
OS Version: 6.3
Flash Version: Shockwave Flash 25.0 r0
,
Mar 28 2017
Hrm...I suspect something is calling GenerateAcceptLanguageHeader (which adds the q values, but doesn't expect them on its input) with "en-US,en;q=0.5". Where in the world that string actually comes from is a far more interesting question. [+jshin]: Looks like you own https://cs.chromium.org/chromium/src/ui/base/l10n/, which is where the default value for this comes from, I think? https://cs.chromium.org/chromium/src/chrome/browser/ui/prefs/prefs_tab_helper.cc?q=kAcceptLanguages+-file:test%5C.&dr=C&l=548 Of course, unclear if this is the default value or being set elsewhere - I couldn't find any q=0.5's in the codebase, but that doesn't mean anything. Testing locally with the same version (56.0.2924.87), I look to be sending the correct "en-US,en;q=0.8" header.
,
Apr 4 2017
,
Apr 4 2017
Seems like something is causing the preference string to have the wrong value? Did a previous Chrome version store the quality indicator in the preference string? This might mean those need to be cleaned up somehow.
,
Apr 5 2017
,
Apr 5 2017
Adding Blink>Network (as opposed to internals) since this is web exposed. Can someone on the network team help route this?
,
Apr 6 2017
I don't think we can do anything here.
,
Jul 18 2017
,
Jul 26 2017
,
Oct 27 2017
I can't reproduce the issue. The function that generates the AcceptLanguage HTTP header is called in two places: user preferences and options in headless Chrome. In the first case, a malformed string would occur only if the user preferences have been corrupted in the past and they never changed them. In the second case, it depends on whatever device is embedding Chrome and that is outside of what we can control. For the first case, we could implement a sanitizer that cleans malformed user preferences, but I don't think it's worth it to deploy this and run it for all Chrome users. I would close this bug as "cannot reproduce". @Yana: what do you think?
,
Oct 27 2017
Agreed. Close as can't reproduce.
,
Oct 30 2017
|
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by cbiesin...@chromium.org
, Mar 28 2017