mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-10-07 21:13:18 +01:00
Uploading a password-protected .xlsb workbook without its password answered 500 with the unattributable-failure message instead of 400 with the remedy. DetectPasswordProtection in pkg/modules/libreoffice/api/protection.go infers encryption from a compound-file header carried by an extension whose unencrypted form is always a ZIP package. The ooxmlExtensions map listed .xlsx, .xlsm, .xltx and .xltm but not .xlsb, so an encrypted workbook under that extension fell through to PasswordProtectionUnknown. The convert route in pkg/modules/libreoffice/routes.go then matched neither password branch of its exit-code switch and returned the 500 default. An Excel Binary Workbook is an Open Packaging Conventions ZIP holding binary parts, so a compound file under that extension is encrypted for the same reason .xlsx is. Adding .xlsb to the map restores the 400 that names the 'password' form field.