thephpleague / flysystem

Abstraction for local and remote filesystems

Home Page:https://flysystem.thephpleague.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"invalid size" error in SftpAdapter after upgrading to 3.25

nicolus opened this issue · comments

commented

We have a daily upload to a remote SFTP server using an ecdsa key, which has been working flawlessly for weeks using v 3.23.1.

After upgrading to v 3.25.0 we suddenly get the error Unable to write file at location: XXX. Invalid size thrown at vendor/league/flysystem/src/UnableToWriteFile.php:24

With the following Stacktrace for the previous exception :

vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php:3664
vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php:4075
vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php:2974
vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php:550
vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php:624
vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php:536
vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php:2108
vendor/league/flysystem-sftp-v3/SftpAdapter.php:90
vendor/league/flysystem-sftp-v3/SftpAdapter.php:144
vendor/league/flysystem/src/Filesystem.php:70
vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php:360
vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php:403

Reverting to 3.23.1 immediately fixed the issue.

That's odd. If I look at the changes, there's not a lot that could have caused this, but also not a lot that look suspicious: thephpleague/flysystem-sftp-v3@3.23.1...3.25.0

@nicolus I've found a lingering instance and have, which is now picked up. Can you check if latest 3.x works for you?

commented

Thanks for looking into it @frankdejonge , I'm out of the office for the next week but I'll see if someone can check it out.

@nicolus any updated from your side?

commented

@frankdejonge : Sorry about the delay, so I was able to do more testing and it was indeed fixed, I retested various versions against the problematic server / key to make sure it wasn't just an issue occurring randomly, and here are the results :

  • 3.23.1 : Works fine
  • 3.25.0 : fails with invalid size error
  • latest 3.x-dev : Works fine
  • 3.26.0 : works fine too

So it seems to be fixed for me in 3.26.0 👍

All good, busy time happen to all of us. Thank for the reply, closing this as fixed.