brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.74k stars 2.31k forks source link

[CR126] Downloads page is inherited from upstream as the warning buttons are not shown when dangerous files are downloaded #38657

Closed MadhaviSeelam closed 4 months ago

MadhaviSeelam commented 4 months ago

Description

[Edit: including normal file download buttons as well] Found while testing https://github.com/brave/brave-browser/issues/38556. When tested to verify downloading a malicious file via https://testsafebrowsing.appspot.com/s/content.exe, Remove from list and Keep dangerous file buttons are not shown in the brave://downloads page. And the page is inherited from chromium as chrome://downloads page shown same. Downloaded normal files and Pause, Cancel, Resume & Retry buttons are not shown when regular files (not malicious) are downloaded

Steps to reproduce

  1. Install
  2. launch Brave
  3. open https://testsafebrowsing.appspot.com/s/content.exe in a new tab
  4. open https://ubuntu.com/download/desktop/thank-you?version=24.04&architecture=amd64&lts=true
  5. click Save
  6. open brave://downloads page

Actual result

Remove from list and Keep dangerous file buttons are not shown

example example example example
image image image image

Expected result

Remove from list and Keep dangerous file buttons should be shown

example example example
image image image image

Reproduces how often

Easily reproduced

Brave version (brave://version info)

Brave | 1.68.55 Chromium: 126.0.6478.17 (Official Build) nightly (64-bit)
-- | --
Revision | 5a7678f3d6d2c339a12dd6a91d6369c04cd34287
OS | Windows 11 Version 23H2 (Build 22631.3593)

Channel information

Reproducibility

Miscellaneous information

@rebron @emerick cc: @brave/qa-team

emerick commented 4 months ago

This change is due to the kImprovedDownloadPageWarnings which is now enabled by default. I'm pushing a PR that disables that setting which restores the old UI, but the buttons seem a little bit squared off to me. Not sure if that's acceptable or not. Might need someone like @fallaciousreasoning to take a look, if not.

This is what they look like with my change Screenshot 2024-05-29 161050

fallaciousreasoning commented 4 months ago

@emerick that's fine - @aguscruiz squared all the squircles :D

kjozwiak commented 4 months ago

The above requires 1.67.101 or higher for 1.67.x verification 👍

MadhaviSeelam commented 4 months ago

Verification PASSED using

Brave | 1.67.101 Chromium: 126.0.6478.26 (Official Build) beta (64-bit)
-- | --
Revision | a561f4b53cdb831888e5cd702d2b8f9598c00f50
OS | Windows 11 Version 23H2 (Build 22631.3672)

Verified using the STR from issue description https://github.com/brave/brave-browser/issues/38657#issue-2322105488

Confirmed Remove from list and Keep dangerous file buttons are shown for dangerous file downloads Confirmed Download page buttons (Pause, Cancel, Resume, Retry) are shown and working as expected

example example example example example example
image image image image image image