giampaolo / pyftpdlib

Extremely fast and scalable Python FTP server library
MIT License
1.68k stars 264 forks source link

file group name with umlauts raise an UnicodeDecodeError #482

Open Ammonios opened 5 years ago

Ammonios commented 5 years ago

When a file has umlauts in group name, the ftp server raise an UnicodeDecodeError. Running the ftp server on Mac as

python -m pyftpdlib

-rw-r--r-- 1 ammonios ABC\Domänen-Benutzer 110B 20 Dez 09:51 test2.zip

File "/Library/Python/2.7/site-packages/pyftpdlib/handlers.py", line 1759, in push_dtp_data self.data_channel.push_with_producer(data) File "/Library/Python/2.7/site-packages/pyftpdlib/handlers.py", line 659, in push_with_producer AsyncChat.push_with_producer(self, producer) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asynchat.py", line 197, in push_with_producer self.initiate_send() File "/Library/Python/2.7/site-packages/pyftpdlib/handlers.py", line 665, in initiate_send asynchat.async_chat.initiate_send(self) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asynchat.py", line 233, in initiate_send data = first.more() File "/Library/Python/2.7/site-packages/pyftpdlib/handlers.py", line 1064, in more buffer.append(next(self.iterator)) File "/Library/Python/2.7/site-packages/pyftpdlib/filesystems.py", line 476, in format_list perms, nlinks, uname, gname, size, mtimestr, basename) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 37: ordinal not in range(128)