brave / brave-browser

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

Proofpoint's urldefense.com redirects are broken #41134

Closed fmarier closed 1 month ago

fmarier commented 1 month ago

Description

If Brave's query string filter detects parameters to strip out in Proofpoint's redirect URLs, it will break the signature that Proofpoint adds to the URL and prevent the redirect from working.

From https://github.com/uBlockOrigin/uAssets/issues/25350.

Steps to reproduce

  1. Open https://urldefense.com/v3/__https://www.portainer.io/hs/preferences-center/en/direct?data=W2nXS-N30h-M1W45lXqV2nFX8ZW3SzKNq3gnnN0W4cQh6C1Bnn1kW1VjfB24fr2-BW4mm3dy3T2wkqW2MWfBj49z9PPW4mqs512qWTfrW4px5K71Nn7N2W32DKbz1V7s-qW21bSln2KWpS4W1SdHmq2YwgS9W3P8RNt2r6W8pW49QSSt1_tcPsW3GSrf749CfyJW2PPdX33JPrgmW4hcHf84hm-NmW2FS2pd2sMKL-W2YGYkz43RS-9W4pjpV52t0rxlW3SB_f94psLW2W3_Sm6w2FGVTjW3K2-cG4fzZLWW2qDSdB3bzPyBW3j8X_q2PMxWzW36CtK22MvcXrW4hNdFB3DLWP3W3VMWNy3SYMyvW1Vs-MC43NZJNW4hLsTd2B1T2JW2sB9wk3DMh2mW2D0QS-2t04tYW43Cpv42Tz6SwW32rgcB3_SfvDW4mq1yB36nnnkW3BNLQw2YfSH9W49sKsP3z4zKPW3zd1YL1Zm6S3W4kmj3Z2sQ7WVW36xkSD2RSm5hW1Q0SqC30sK9ZW2-kSbQ2nH5KcW36fNc_2RjGNjW36pblN43qsbhW2CCNvJ3_SL29W1_sQHx4fqK9NW3Sy1cb4mpD3h0&utm_campaign=XNF&utm_source=hs_automation&utm_medium=email&utm_content=264158909&_hsenc=p2ANqtz--9JvIgI266aB1UVizENwYNYREZSotsXOhWcMNeKjZLJO9ZwmR9xlyfsQN2orbT25IymZ_vKUNTANMKQMVQBnzowi2339ExVoOKMJaHx0t2yn5esgg&_hsmi=264158909__;!!MlclJBHn!0eDf-zTf69h-IhFT9WDu2GIXAtCy6RENwguPVpTF1k2K-Nbnzy1NXix2Gj7azc8yDFyI2z3Tz4nTFuGe2hlLzsBl$

Actual result

You end up on https://urldefense.com/jerror Screenshot from 2024-09-18 13-58-12

Expected result

You should end up on https://www.portainer.io/hs/preferences-center/en/direct?data=W2nXS-N30h-M1W45lXqV2nFX8ZW3SzKNq3gnnN0W4cQh6C1Bnn1kW1VjfB24fr2-BW4mm3dy3T2wkqW2MWfBj49z9PPW4mqs512qWTfrW4px5K71Nn7N2W32DKbz1V7s-qW21bSln2KWpS4W1SdHmq2YwgS9W3P8RNt2r6W8pW49QSSt1_tcPsW3GSrf749CfyJW2PPdX33JPrgmW4hcHf84hm-NmW2FS2pd2sMKL-W2YGYkz43RS-9W4pjpV52t0rxlW3SB_f94psLW2W3_Sm6w2FGVTjW3K2-cG4fzZLWW2qDSdB3bzPyBW3j8X_q2PMxWzW36CtK22MvcXrW4hNdFB3DLWP3W3VMWNy3SYMyvW1Vs-MC43NZJNW4hLsTd2B1T2JW2sB9wk3DMh2mW2D0QS-2t04tYW43Cpv42Tz6SwW32rgcB3_SfvDW4mq1yB36nnnkW3BNLQw2YfSH9W49sKsP3z4zKPW3zd1YL1Zm6S3W4kmj3Z2sQ7WVW36xkSD2RSm5hW1Q0SqC30sK9ZW2-kSbQ2nH5KcW36fNc_2RjGNjW36pblN43qsbhW2CCNvJ3_SL29W1_sQHx4fqK9NW3Sy1cb4mpD3h0 Screenshot from 2024-09-18 13-59-06

Reproduces how often

Easily reproduced

Desktop Brave version (brave://version info)

Brave   1.70.107 Chromium: 128.0.6613.120 (Official Build) beta (64-bit) 
Revision    ab3f504ca4a15c330f60a93d5e3773d780498980
OS  Linux

Android device

Channel information

Reproducibility

Miscellaneous information

Work-around:

  1. Open https://urldefense.com/jerror
  2. Click on the Shields icon in the URL bar
  3. Disable Shields for that site.

From there on, the redirects will work.

fmarier commented 1 month ago

Looks like V2 of their service didn't have that problem because they used to encode the original URL:

kjozwiak commented 1 month ago

The above requires 1.70.119 or higher for 1.70.x verification 👍

kjozwiak commented 1 month ago

Verification PASSED on Win 11 x64 using the following build(s):

Brave | 1.70.119 Chromium: 129.0.6668.70 (Official Build) (64-bit)
-- | --
Revision | a15c836a4df987f118ece1645f54b081019049de
OS | Windows 11 Version 23H2 (Build 22631.4169)

Using the STR/Cases outlined via https://github.com/brave/brave-browser/issues/41134#issue-2534728363, ensured that the URL that was provided correctly re-directed to https://www.portainer.io and didn't display an error message as per the following:

https://github.com/user-attachments/assets/aaca5fc3-c1ca-4e04-8897-dc25721291f8

hffvld commented 1 month ago

Verified on Pixel 7 using version(s):

Device/OS: Pixel 7 / panther_beta-user 15 AP41.240823.009 release-keys
Brave build: 1.70.119
Chromium: 129.0.6668.70 (Official Build) (64-bit) 

STEPS:

  1. Follow the STR/TP from https://github.com/brave/brave-browser/issues/41134#issue-2534728363
  2. Verify

ACTUAL RESULTS:


1 2
1 2