-
Notifications
You must be signed in to change notification settings - Fork 862
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 won't include items with non-http-or-https destination urls #16519
Conversation
|
entry->data->score = entry->data->score * variety; | ||
variety = variety * 2.0; | ||
} | ||
DirectFeedController::BuildArticles(articles, response->data, |
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.
Moved this logic to a more testable function
if (!item->data->url.SchemeIsHTTPOrHTTPS()) { | ||
continue; | ||
} |
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 bypasses non-http(s) items from direct-downloaded RSS feeds
if (!url.SchemeIsHTTPOrHTTPS()) { | ||
VLOG(1) << "Item url was not HTTP or HTTPS: " << url.spec(); | ||
return false; | ||
} |
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 bypasses non-http(s) items from the combined feed hosted by Brave
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.
Is there a corresponding backend change? I think ideally we wouldn't be including any non-https items in the combined feed in the first place.
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.
I would hope it wouldn't include it but doesn't hurt to double-check. And there's always the possibility someone points the browser to a third party combined feed source via the cli param...
Applies to both the combined feed (feed.json hosted on Brave's PCDN) and direct feeds (i.e. RSS feeds)
1bde50f
to
435c8e3
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
if (!url.SchemeIsHTTPOrHTTPS()) { | ||
VLOG(1) << "Item url was not HTTP or HTTPS: " << url.spec(); | ||
return false; | ||
} |
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.
Is there a corresponding backend change? I think ideally we wouldn't be including any non-https items in the combined feed in the first place.
// Convert from the "combined feed" hosted remotely to Brave News mojom items. | ||
// TODO(petemill): Rename this file to combined_feed_parsing.h or similar, | ||
// in order to differentiate the "Combined Feed" from | ||
// a "Direct Feed" (a.k.a RSS). |
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.
👍
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 👍
Brave News won't include items with non-http-or-https destination urls
Brave News won't include items with non-http-or-https destination urls
Verification PASSED on
Verification notes can be found via https://github.com/brave/internal/issues/987#issuecomment-1376133449. |
Applies to both the combined feed (feed.json hosted on Brave's PCDN) and direct feeds (i.e. RSS feeds)
Resolves brave/brave-browser#27602
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
wikinpm run lint
,npm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
STR/Cases can be found via https://github.com/brave/internal/issues/987#issue-1526132512.