path: root/util
diff options
authorYorhel <>2022-08-25 11:34:07 +0200
committerYorhel <>2022-08-25 11:34:15 +0200
commitb0835fb5afa6b322da7e6e68c159b54f7ec7695c (patch)
tree1dbdd48ea73dca4393b3b09d15f11cc02f8be1d1 /util
parent5d4ea45a86d8316aeae789f614057795715d9e67 (diff)
Move loading custom CSS to separate request + increase maximum size
This reduces potential the attack surface of HTML inlining... I hope, and is also more efficient than including the users' CSS on every page.
Diffstat (limited to 'util')
1 files changed, 3 insertions, 0 deletions
diff --git a/util/updates/2022-08-25-customcss-csum.sql b/util/updates/2022-08-25-customcss-csum.sql
new file mode 100644
index 00000000..8a2a8938
--- /dev/null
+++ b/util/updates/2022-08-25-customcss-csum.sql
@@ -0,0 +1,3 @@
+ALTER TABLE users_prefs ADD COLUMN customcss_csum bigint NOT NULL DEFAULT 0;
+-- '1' is not exactly a checksum, but it'll do fine for the first version.
+UPDATE users_prefs SET customcss_csum = 1 WHERE customcss <> '';