-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
brave/brave-core
#522Milestone
Description
Description
When viewing a youtube video, an interval query is sent to get information about viewing times, channel, media ID, etc.
When adding to ledger, the publisher ID is split from the video ID with an underscore delimiter. However, IDs can contain an underscore and will cause 404s when trying to query for publisher.
If video ID begins with an underscore, we will have an empty mediaID, DCHECK will fail, and Brave will crash in debug mode.
Steps to Reproduce
- Open Brave and have Rewards enabled
- View video at https://www.youtube.com/watch?v=_FQJEzJ_cQw
Result: Brave will fail DCHECK and crash in debug mode
- Open Brave and have Rewards enabled
- View video at https://www.youtube.com/watch?v=iwprDM-K_3w
Result: Youtube frontend proxy returns 404s in terminal and publisher is not added to autocontribute
Expected result:
Publishers should be added to ledger. Brave should not crash.
Reproduces how often:
100% not added to autocontribute when video id contains an underscore.
100% crashes in debug when video id begins with underscore
Brave version (chrome://version info)
| Brave | 0.55.2 Chromium: 70.0.3538.22 (Developer Build) (64-bit) |
|---|---|
| Revision | ac9418ba9c3bd7f6baaffa0b055dfe147e0f8364-refs/branch-heads/3538@{#468} |
| OS | Mac OS X |
Reproducible on current release:
Untested
Website problems only:
- Does the issue resolve itself when disabling Brave Shields? No
- Is the issue reproducible on the latest version of Chrome? NA
Additional Information
Video IDs will need to be split properly with [-_0-9A-Za-z]{11} as a mandatory constraint as the first part.