Fix server crash decoding invalid filter groups

This commit is contained in:
advplyr committed 2026-09-22 18:00:08 -05:00
1 parent aef33df8d3
commit c654de4630
2 files changed
+12 -2

No files matched your search

+6 -1
View File
@@ -11,7 +11,12 @@ const naturalSort = createNewSortInstance({
module.exports = {
decode(text) {
return Buffer.from(decodeURIComponent(text), 'base64').toString()
try {
return Buffer.from(decodeURIComponent(text), 'base64').toString()
} catch (error) {
Logger.warn(`[libraryFilters] Failed to decode filter value "${text}": ${error.message}`)
return null
}
},
/**
+6 -1
View File
@@ -5,7 +5,12 @@ const libraryItemsBookFilters = require('./libraryItemsBookFilters')
module.exports = {
decode(text) {
return Buffer.from(decodeURIComponent(text), 'base64').toString()
try {
return Buffer.from(decodeURIComponent(text), 'base64').toString()
} catch (error) {
Logger.warn(`[seriesFilters] Failed to decode filter value "${text}": ${error.message}`)
return null
}
},
/**