-
Notifications
You must be signed in to change notification settings - Fork 906
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
[Brave News]: Fix crash with non-utf-8 RSS feeds. #15714
Conversation
916b9f5
to
29d47da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Verified
|
Brave | 1.47.36 Chromium: 107.0.5304.91 (Official Build) nightly (x86_64) |
---|---|
Revision | 3d5948960d62418160796d5831a4d2d7d6c90fa8-refs/branch-heads/5304@{#1097} |
OS | macOS Version 11.7.1 (Build 20G918) |
Steps:
- install
1.47.36
- launch Brave
- set
brave://flags/#brave-news-v2
toEnabled
- set
brave://flags/#brave-news-subscribe-button
toEnabled
- click
Relaunch
- load
https://www.pravda.com.ua/eng/news/
Confirmed no crashes when loading https://www.pravda.com.ua/eng/news/
with the above flags enabled
[Uplift] [Brave News]: Fix crash with non-utf-8 RSS feeds. (#15714)
@@ -211,7 +230,7 @@ void DirectFeedController::FindFeeds( | |||
|
|||
// Response is valid, but still might not be a feed | |||
ParseFeedDataOffMainThread( | |||
feed_url, body_content, | |||
feed_url, charset, std::move(body_content), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This std::move
of body_content
is problematic since it means body_content
is empty when accessed later in the callback if the content was HTML and not RSS. I'm pretty sure it's causing brave/brave-browser#26550
Resolves brave/brave-browser#26321
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: