crifurch / pure_ftp_server

MIT License
0 stars 1 forks source link

Crash when using with FileZilla client #1

Open alextekartik opened 14 hours ago

alextekartik commented 14 hours ago

Thanks for working on a FTP server ! I tried to use it with the standard FileZilla client.

[2024-10-22 07:17:22.279856] 127.0.0.1:127.0.0.1> 220 Welcome to dart Pure FTP Server
[2024-10-22 07:17:22.290522] 127.0.0.1:127.0.0.1< USER admin

[2024-10-22 07:17:22.293448] 127.0.0.1:127.0.0.1> 331 Provide password
[2024-10-22 07:17:22.293698] 127.0.0.1:127.0.0.1< PASS admin

[2024-10-22 07:17:22.295355] 127.0.0.1:127.0.0.1> 220 Successful authorized
[2024-10-22 07:17:22.297349] 127.0.0.1:127.0.0.1< PWD

[2024-10-22 07:17:22.297689] 127.0.0.1:127.0.0.1> 220 /
[2024-10-22 07:17:22.298065] 127.0.0.1:127.0.0.1< TYPE I

[2024-10-22 07:17:22.298526] 127.0.0.1:127.0.0.1> 220 changed transfer type to binary
[2024-10-22 07:17:22.298830] 127.0.0.1:127.0.0.1< PASV

[2024-10-22 07:17:22.303829] 127.0.0.1:127.0.0.1> 227 Entering Passive Mode (192,168,1,21,214,216)
Null check operator used on a null value
[2024-10-22 07:17:22.304717] 127.0.0.1:127.0.0.1> 550 Error while handling
[2024-10-22 07:17:22.304811] 127.0.0.1:127.0.0.1< LIST

[2024-10-22 07:17:22.306775] 127.0.0.1:127.0.0.1> 150 Accepted data connection
[2024-10-22 07:17:22.306807] 127.0.0.1:127.0.0.1> 226 Options: -l
[2024-10-22 07:17:22.306842] 127.0.0.1:127.0.0.1> 226 Options: 14 matches
Null check operator used on a null value
[2024-10-22 07:17:22.307899] 127.0.0.1:127.0.0.1> 550 Error while handling

I added some stack info in the source code so that it reveals where it crashes:

[2024-10-22 07:20:13.270593] 127.0.0.1:127.0.0.1> 227 Entering Passive Mode (192,168,1,21,214,216)
#0      PassiveTransferSocket.waitClient (package:pure_ftp_server/src/transfer/passive_transfer_socket.dart:26:31)
#1      PasvHandler.handle (package:pure_ftp_server/src/ftp/handler/commands_handler/transfer/pasv_handler.dart:23:26)
<asynchronous suspension>
#2      ClientSession._onMessage (package:pure_ftp_server/src/client/client_session.dart:51:18)
<asynchronous suspension>

Indeed _serverSocket is null in waitClient()

crifurch commented 5 hours ago

Hi, thank you for using my package, i will try deep into your problem when i will have more free time. I will try do that asap.