You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With your proposed changes $sftp->realpath('') would return /. It's not immediately obvious what it ought to return but my gut says that it'd be better if it returned the same thing that $sftp->realpath('.') returned? This could be faciliated by doing if (!strlen($path) || $path[0] != '/') { or if (!$path || $path[0] != '/') {.
Do you have any strong opinion on / or $sftp->realpath('.') ?
I have no real opinion on this as I simply don't know enough on the subject. The fix was the one I applied to make the problem go away and to not change any paths in my own use case
phpseclib version 2.0.27
program NET\SFTP.php
function _realpath
Issue
if empty value is passed to _realpath as the value of $path, the following error is generated:
Solution
Change line 722 from
to
The text was updated successfully, but these errors were encountered: