We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c76636 commit 7278bc7Copy full SHA for 7278bc7
rust/ql/test/query-tests/security/CWE-079/actix/main.rs
@@ -25,19 +25,6 @@ async fn vulnerable_handler(path: web::Path<String>) -> impl Responder {
25
Html::new(html) // $ Alert[rust/xss]=a
26
}
27
28
-fn html_escape(s: &str) -> String {
29
- s.chars()
30
- .map(|c| match c {
31
- '<' => "<".to_string(),
32
- '>' => ">".to_string(),
33
- '&' => "&".to_string(),
34
- '"' => """.to_string(),
35
- '\'' => "'".to_string(),
36
- _ => c.to_string(),
37
- })
38
- .collect()
39
-}
40
-
41
#[get("/good/{a}")]
42
// The "good" example from the qldoc
43
async fn safe_handler_with_encoding(path: web::Path<String>) -> impl Responder {
0 commit comments