apache / mina-ftpserver

Apache Mina FTP Server
Apache License 2.0
50 stars 27 forks source link

Simplify conditions and avoid extra compute. #17

Closed arturobernalg closed 2 years ago

elecharny commented 2 years ago

Hi Arturo,

for the OPTS_MLST patch, I think the logic would be to check if the returned array is not empty, and if so returning an error. The current code check if it's NULL but I think it's a mistake. So your suggestion is correct (logically) but I'd rather change the 'if' and keep it.

elecharny commented 2 years ago

Hi Artur,

it's more complicated that what I thought. Actually, the handling of the OPTS_MLST command is not properly done. Looking at the RFC, there are syntax errors that are not checked. Looking at, we should get an error when sending such a request:

C> opts MLst unique type; S> 501 Invalid MLST options

Actually, we don't...

elecharny commented 2 years ago

PR applied in 1.1.X branch (work in progress for 1.2.X)

elecharny commented 2 years ago

PR applied in 1.2.X