diff plugins/mod_storage_sql.lua @ 13915:9a69918b5e63 13.0

mod_storage_sql: Assert that serialization of archive:set() payload succeeds Potentially encountered on a production server - the assert() should prevent more subtle failure modes, and help us pinpoint the root cause.
author Matthew Wild <mwild1@gmail.com>
date Tue, 22 Jul 2025 16:34:27 +0100
parents ce4b4c2863f3
children b7714c28442f 758d5d4e83ca
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua	Mon Jul 14 16:42:59 2025 +0200
+++ b/plugins/mod_storage_sql.lua	Tue Jul 22 16:34:27 2025 +0100
@@ -556,7 +556,7 @@
 		if new_value then
 			table.insert(setf, '"type" = ?')
 			table.insert(setf, '"value" = ?')
-			local t, value = serialize(new_value);
+			local t, value = assert(serialize(new_value));
 			table.insert(args, 1, t);
 			table.insert(args, 2, value);
 		end