This commit is contained in:
terrafrost 2013-03-12 20:58:37 -05:00
commit 3153daf548
3 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,5 @@
phpseclib Lead Developer: TerraFrost (Jim Wigginton)
phpseclib Developers: monnerat (Patrick Monnerat)
phpseclib Developers: monnerat (Patrick Monnerat)
bantu (Andreas Fischer)
petrich (Hans-Jürgen Petrich)

View File

@ -53,7 +53,8 @@
* @return String
* @access public
*/
function crypt_random_string($length) {
function crypt_random_string($length)
{
// PHP_OS & "\xDF\xDF\xDF" == strtoupper(substr(PHP_OS, 0, 3)), but a lot faster
if ((PHP_OS & "\xDF\xDF\xDF") === 'WIN') {
// method 1. prior to PHP 5.3 this would call rand() on windows hence the function_exists('class_alias') call.

View File

@ -985,7 +985,7 @@ class Net_SFTP extends Net_SSH2 {
*/
function _size($filename)
{
$result = $this->_stat($filename, NET_SFTP_LSTAT);
$result = $this->_stat($filename, NET_SFTP_STAT);
if ($result === false) {
return false;
}
@ -1891,8 +1891,11 @@ class Net_SFTP extends Net_SSH2 {
break;
case NET_SFTP_ATTR_PERMISSIONS: // 0x00000004
$attr+= unpack('Npermissions', $this->_string_shift($response, 4));
// mode == permissions; permissions was the original array key and is retained for bc purposes.
// mode was added because that's the more industry standard terminology
$attr+= array('mode' => $attr['permissions']);
$fileType = $this->_parseMode($attr['permissions']);
if ($filetype !== false) {
if ($fileType !== false) {
$attr+= array('type' => $fileType);
}
break;