-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: CBZ error of "Malicious Entry" during scan #3804
Comments
I'm not sure how to reproduce this. I just created a CBZ on windows and it works fine. I'm not sure where backslashes are being specified? |
Originally posted here https://discord.com/channels/942908292873723984/942914154254176257/1325857075351261395 It looks like the backslash is a result of building the CBZ on Windows and is put into the file lookup, but I'm not sure if it is only specific software. The error is from the path |
I was able to reproduce this after I was sent the bad file. I verified that running I found that the CBZ with backslashes was likely created using an old .NET version. Found that here antelle/node-stream-zip#62 They reference the ZIP file specs that say using forwarded slashes is a requirement:
For this reason I don't think we do anything with this issue unless it becomes a common problem in which case we could put something together to show a better error message. |
Actually I just realized this crashes the server so we should fix that |
This comic works now since the zip library in the frontend is able to extract the comic. The server will throw an error when trying to parse the metadata. |
What happened?
(originally reported in Discord)
When uploading a CBZ file, an error occurs when parsing the CBZ. This is due to
node-stream-zip
detecting the backslashes as a potential directory traversal attack.This is due to backslashes being used within the CBZ (such as when it is created on Windows). Recreating the CBZ with forward slashes for the directories fixed the issue and the CBZ is able to be scanned by ABS.
What did you expect to happen?
CBZ to be parsed correctly, or detection and correction of directory path if applicable.
Steps to reproduce the issue
Audiobookshelf version
v2.17.7
How are you running audiobookshelf?
Docker
What OS is your Audiobookshelf server hosted from?
Windows
If the issue is being seen in the UI, what browsers are you seeing the problem on?
None
Logs
Additional Notes
No response
The text was updated successfully, but these errors were encountered: