Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TOO MANY REDIRECTS caused by Brave's user agent behavior #6966

Closed
mikegrima opened this issue Nov 16, 2019 · 9 comments · Fixed by brave/brave-core#4143
Closed

TOO MANY REDIRECTS caused by Brave's user agent behavior #6966

mikegrima opened this issue Nov 16, 2019 · 9 comments · Fixed by brave/brave-core#4143

Comments

@mikegrima
Copy link

Description

Hello:

With recent Brave releases, there was a change to the user-agent behavior that breaks authentication on sites that utilize zmartzone/mod_auth_openidc. Effectively, Brave now randomizes the number of Braves in the user-agent, which some authentication systems rely on.

The issue is documented in more detail here: OpenIDC/mod_auth_openidc#452

Can an option be added to disable this behavior? This currently breaks Brave for use on our internal sites.

Steps to Reproduce

  1. Go to an internal authenticated site that uses zmartzone/mod_auth_openidc
  2. ERR_TOO_MANY_REDIRECTS

Brave version (brave://version info)

Brave | 1.0.0 Chromium: 78.0.3904.97 (Official Build) (64-bit)
Revision | 021b9028c246d820be17a10e5b393ee90f41375e-refs/branch-heads/3904@{#859}
@fmarier
Copy link
Member

fmarier commented Nov 17, 2019

Is there a public test site that can be used to reproduce the problem?

@mikegrima
Copy link
Author

That's a great question. I have not encountered any issues with public sites -- only our internal sites.

@drkancharla is there an easy way to demonstrate this behavior -- like a docker image that could be set up to make it easy to test?

@bsclifton
Copy link
Member

Definitely a bug with the custom user-agent logic we have:
https://github.com/brave/brave-core/blob/66ceaf3491778f7d9a62f215c8fb47b318c9b181/browser/net/brave_site_hacks_network_delegate_helper.cc#L62-L76

Appears it will always do a substitution, leading to multiple Brave strings in the UA

@bsclifton
Copy link
Member

Marking as QA/No since I don't believe there are steps to reproduce. But we have an automated test in brave/brave-core#4143

@iefremov
Copy link
Contributor

I've reproduced on netflix.com - it redirected me to the russian site :) After the redirect "Brave Brave" is visible in User-Agent in devtools

@mikegrima
Copy link
Author

@bsclifton I'm happy to test this with a pre-release version.

@mikegrima
Copy link
Author

Confirmed that the nightly works 🎉

Thank you all for getting this done!

@bsclifton
Copy link
Member

@mikegrima awesome! Thanks for confirming 😄👍

@mikegrima
Copy link
Author

mikegrima commented Jan 18, 2020

Is it possible to move this to an earlier release? I would really like to start using Brave at work again.

I can confirm that it's working perfectly in the 1.4.x Dev release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants