Mercurial > prosody-hg
changeset 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 | 2f754817bf4b |
| children | 7761360ffb7b f0d854c63c8d |
| files | plugins/mod_storage_sql.lua |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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
