-
Notifications
You must be signed in to change notification settings - Fork 378
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]: Server crash on downloading episodes with big names #1261
Comments
Log
Pod log from TrueNAS Scale
I got my brain working a bit better and tried to download episodes and place them manually. That did not work. Error happens both on TrueNAS Scale server with zfs file system, where auidobookshelf is running, and on local Linux distribution with ext4 filesystem. KDE Kasts was able to get the episode as it renames them to seemingly random strings of latin characters and numbers. The file I got was named
Then I truncated the cyrillic string until the error disappears, which happened here:
Original string (with '.mp3' extension) has 172 individual characters (graphemes) and takes 322 bytes in UTF-8 encoding. As far as I understand, non-latin characters take more space, therefore they may cause this problem before reaching 240 characters count.
So if people will start making podcasts episodes with titles made exclusively out of emojis - big trouble. |
I updated the script to keep the filename under 255 bytes. I think this should cover it for a while even though Windows file system does allow for longer. |
Fixed in v2.2.9 |
Describe the issue
Server crashes when attempting to download a podcast episode with a long (cyrillic) title.
From what I understood Javascript is using UTF-16 encoding and, after a few tests, I am assuming that crash happens if name's size exceeds 256 bytes (I was using online calculator to determine string sizes):
Steps to reproduce the issue
Audiobookshelf version
v2.2.8
How are you running audiobookshelf?
Docker
The text was updated successfully, but these errors were encountered: