Update:Disable epubs from running scripts by default, add library setting to enable it GHSA-7j99-76cj-q9pg

This commit is contained in:
advplyr 2024-05-26 16:01:08 -05:00
parent 8ec9da143f
commit ce7f891b9b
30 changed files with 104 additions and 28 deletions

View file

@ -8,6 +8,7 @@ class LibrarySettings {
this.skipMatchingMediaWithIsbn = false
this.autoScanCronExpression = null
this.audiobooksOnly = false
this.epubsAllowScriptedContent = false
this.hideSingleBookSeries = false // Do not show series that only have 1 book
this.onlyShowLaterBooksInContinueSeries = false // Skip showing books that are earlier than the max sequence read
this.metadataPrecedence = ['folderStructure', 'audioMetatags', 'nfoFile', 'txtFiles', 'opfFile', 'absMetadata']
@ -25,6 +26,7 @@ class LibrarySettings {
this.skipMatchingMediaWithIsbn = !!settings.skipMatchingMediaWithIsbn
this.autoScanCronExpression = settings.autoScanCronExpression || null
this.audiobooksOnly = !!settings.audiobooksOnly
this.epubsAllowScriptedContent = !!settings.epubsAllowScriptedContent
this.hideSingleBookSeries = !!settings.hideSingleBookSeries
this.onlyShowLaterBooksInContinueSeries = !!settings.onlyShowLaterBooksInContinueSeries
if (settings.metadataPrecedence) {
@ -44,6 +46,7 @@ class LibrarySettings {
skipMatchingMediaWithIsbn: this.skipMatchingMediaWithIsbn,
autoScanCronExpression: this.autoScanCronExpression,
audiobooksOnly: this.audiobooksOnly,
epubsAllowScriptedContent: this.epubsAllowScriptedContent,
hideSingleBookSeries: this.hideSingleBookSeries,
onlyShowLaterBooksInContinueSeries: this.onlyShowLaterBooksInContinueSeries,
metadataPrecedence: [...this.metadataPrecedence],
@ -67,4 +70,4 @@ class LibrarySettings {
return hasUpdates
}
}
module.exports = LibrarySettings
module.exports = LibrarySettings