mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-07-26 07:58:14 +00:00
Merge pull request 'fix reflected xss when returning errors on web endpoint' (#1471) from escape-errors into main-v2
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1471
This commit is contained in:
Generated
+16
@@ -1881,6 +1881,7 @@ dependencies = [
|
|||||||
"garage_model",
|
"garage_model",
|
||||||
"garage_table",
|
"garage_table",
|
||||||
"garage_util",
|
"garage_util",
|
||||||
|
"html-escape",
|
||||||
"http 1.4.0",
|
"http 1.4.0",
|
||||||
"http-body-util",
|
"http-body-util",
|
||||||
"hyper 1.9.0",
|
"hyper 1.9.0",
|
||||||
@@ -2194,6 +2195,15 @@ dependencies = [
|
|||||||
"windows-link",
|
"windows-link",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "html-escape"
|
||||||
|
version = "0.2.13"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6d1ad449764d627e22bfd7cd5e8868264fc9236e07c752972b4080cd351cb476"
|
||||||
|
dependencies = [
|
||||||
|
"utf8-width",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "http"
|
name = "http"
|
||||||
version = "0.2.12"
|
version = "0.2.12"
|
||||||
@@ -5328,6 +5338,12 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "utf8-width"
|
||||||
|
version = "0.1.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1292c0d970b54115d14f2492fe0170adf21d68a1de108eebc51c1df4f346a091"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "utf8_iter"
|
name = "utf8_iter"
|
||||||
version = "1.0.4"
|
version = "1.0.4"
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ gethostname = "1.1"
|
|||||||
git-version = "0.3"
|
git-version = "0.3"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
hexdump = "0.1"
|
hexdump = "0.1"
|
||||||
|
html-escape = "0.2.13"
|
||||||
hmac = "0.12"
|
hmac = "0.12"
|
||||||
itertools = "0.14"
|
itertools = "0.14"
|
||||||
ipnet = "2.11"
|
ipnet = "2.11"
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ garage_model.workspace = true
|
|||||||
garage_util.workspace = true
|
garage_util.workspace = true
|
||||||
garage_table.workspace = true
|
garage_table.workspace = true
|
||||||
|
|
||||||
|
html-escape.workspace = true
|
||||||
thiserror.workspace = true
|
thiserror.workspace = true
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
percent-encoding.workspace = true
|
percent-encoding.workspace = true
|
||||||
|
|||||||
@@ -483,7 +483,7 @@ fn error_to_res(e: Error) -> Response<BoxBody<Error>> {
|
|||||||
<li>Message: {s3_message}.</li>
|
<li>Message: {s3_message}.</li>
|
||||||
</ul>",
|
</ul>",
|
||||||
s3_code = err.aws_code(),
|
s3_code = err.aws_code(),
|
||||||
s3_message = err,
|
s3_message = html_escape::encode_text(&err.to_string()),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
let mut http_error = Response::new(string_body(body_str));
|
let mut http_error = Response::new(string_body(body_str));
|
||||||
|
|||||||
Reference in New Issue
Block a user