fix(admin): sign CSRF tokens and escape them in scripts (#2071)

This commit is contained in:
Hampus authored and GitHub committed 2026-08-29 14:54:51 +02:00
1 parent 0496b2f530
commit 79064c3399
5 files changed
+97 -64

No files matched your search

+1 -1
View File
@@ -348,7 +348,7 @@ fn oauth_callback_page(config: &AdminConfig, code: Option<&str>, state: Option<&
)
}
fn json_string(value: &str) -> String {
pub(crate) fn json_string(value: &str) -> String {
serde_json::to_string(value)
.expect("JSON string serialization cannot fail")
.replace('<', "\\u003c")