-
Notifications
You must be signed in to change notification settings - Fork 473
Closes #7142: Sanitize url in HttpIconLoader #7160
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7160 +/- ##
============================================
- Coverage 77.23% 76.78% -0.46%
+ Complexity 5044 4783 -261
============================================
Files 674 652 -22
Lines 24692 23519 -1173
Branches 3643 3435 -208
============================================
- Hits 19070 18058 -1012
+ Misses 4113 4023 -90
+ Partials 1509 1438 -71 Continue to review full report at Codecov.
|
@pocmo I preferred to not add a |
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.
@pocmo I preferred to not add a IllegalArgumentException to the exception list on HttpIconLoader.load as it is a implementation detail of GeckoViewFetch/GeckoWebExecutor, that is not necessary true for all implementation of Client. What do you think?
Hm. I think I would prefer if we sanitize one level higher. This came from BrowserIcons
and that code is reading values from the website. This code should take care of sanitizing and probably not blindly trust all values it gets. A Client
bailing out if you feed it something that is not a valid URL sounds okay to me tbh. - I think it's good if it fails and the caller has to think about potentially broken/untrusted values being passed to the Client
.
@pocmo 👍 I updated the pr. Now we are sanitizing in both levels |
...onents/browser/icons/src/main/java/mozilla/components/browser/icons/loader/HttpIconLoader.kt
Outdated
Show resolved
Hide resolved
I updated the pr :) |
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.
Great. 👍
bors r+
7160: Closes #7142: Sanitize url in HttpIconLoader r=pocmo a=Amejia481 Co-authored-by: Arturo Mejia <[email protected]>
Build failed: |
bors retry |
Build succeeded: |
Pull Request checklist
After merge