Incorrect user-agent is set

Description of the issue:
A recent update in Brave has caused the user agent to change based on the type of method that is used to perform a request.

When using the latest version of https://www.npmjs.com/package/axios to do a post request the user-agent header is:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36

Now when I load an iframe (on the same website, to the same website as axios is requesting data from) the headers changes to:
user-agent:

Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36

How can this issue be reproduced?

  1. Open https://codepen.io/Philo01/pen/GRrPZYe
  2. Open your console and switch to the network tab.
  3. Look for one request to github.com (iframe), this will have the Intel Mac OS X 11_2_3 agent.
  4. Look for one request to google.com (axios), this will have the Intel Mac OS X 10_15_7 agent.

Expected result:
Expecting both to be Intel Mac OS X 11_2_3.

Brave Version( check About Brave):
1.23.71

Additional Information:
Worked with previous versions of Brave. I do not have this issue with Firefox or Safari.

@Philo01,
Thank you for reaching out and for your detailed report – can’t tell you how nice it is when users fill out all the requested information adequately!

The issue you’re seeing should have been fixed in the latest browser update to version v1.23.73. Let me know if the issue persists after updating.

1 Like

Thanks @Mattches :slight_smile: The issue has been resolved. No worries haha, I know how frustrating it can be if you get a bug report with just “it doesn’t work” and no additional information :see_no_evil:

Have a great day!

1 Like

You’re very welcome :slight_smile: