Skip to content

Commit

Permalink
fix(routes/pdf/txt): limit charsets to poppler supported ones only
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Mar 23, 2023
1 parent c43756d commit 98145fe
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/routes/pdf/txt/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,27 @@ const pdfToTxtPostSchema = {
S.string()
.default("UTF-8")
.description("Sets the encoding to use for text output")
.pattern(/^[-\w]+$/m)
.enum([
"Big5",
"Big5ascii",
"EUC-CN",
"EUC-JP",
"GBK",
"ISO-2022-CN",
"ISO-2022-JP",
"ISO-2022-KR",
"ISO-8859-6",
"ISO-8859-7",
"ISO-8859-8",
"ISO-8859-9",
"KOI8-R",
"Latin2",
"Shift-JIS",
"TIS-620",
"UTF-8",
"UTF-16",
"Windows-1255",
])
)
.prop(
"ownerPassword",
Expand Down

0 comments on commit 98145fe

Please sign in to comment.