mirror of
https://github.com/servo/servo.git
synced 2025-07-04 05:53:39 +01:00
Prevent injection vulnerability in image page This is taking up nox' suggestion from #12542 and creates an img element using Rust code instead of escaping the URL. I will look at the neterror.html URL strings separately, we might do those in a similar way. To reproduce, visit e.g. the following URL with your vulnerable Servo: ``` https://servo.org/screenshot.png?'onload='document.body.innerHTML=`hacked`' ``` --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #12542 - [x] These changes do not require tests because this is just fixing up existing behavior and I'm not sure how to test it r?@jdm <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12679) <!-- Reviewable:end --> |
||
---|---|---|
.. | ||
docs | ||
dom | ||
parse | ||
task_source | ||
bluetooth_blacklist.rs | ||
build.rs | ||
Cargo.toml | ||
clipboard_provider.rs | ||
devtools.rs | ||
document_loader.rs | ||
layout_wrapper.rs | ||
lib.rs | ||
makefile.cargo | ||
mem.rs | ||
network_listener.rs | ||
origin.rs | ||
script_runtime.rs | ||
script_thread.rs | ||
serviceworker_manager.rs | ||
textinput.rs | ||
timers.rs | ||
unpremultiplytable.rs | ||
webdriver_handlers.rs |