David Hedberg
bbf467babd
SFTP: Add enablePathCanonicalization()/disablePathCanonicalization()
2017-06-12 21:17:55 -05:00
terrafrost
0bb6c9b974
SFTP: rm NO_REALPATH changes
2017-06-05 01:30:30 -05:00
terrafrost
1564a27f6e
SFTP: make NO_REALPATH apply to get() as well
2017-06-05 00:44:29 -05:00
David Hedberg
5979ed571f
SFTP: Add a NO_REALPATH option to put()
2017-06-05 00:12:57 -05:00
terrafrost
35a1102c0b
SFTP: fix put() with php://input as source
2017-05-07 13:25:43 -05:00
terrafrost
8abc0ee60c
SSH2: include <pre> tags in getLog result when SAPI isn't CLI
2017-03-01 22:26:29 -06:00
terrafrost
785b477605
Merge branch 'pty-enhancement' into 1.0
2016-12-24 20:28:19 -06:00
vladimirghetau
d80794b1d9
exec authentication, code reuse
2016-12-17 16:37:04 -06:00
terrafrost
b26f14e5fe
SSH2: make it so disabling PTY closes exec() channel if it's open
2016-12-17 16:09:48 -06:00
terrafrost
d0cb855bbc
Merge branch '1.0-suppress-unpack-errors' into 1.0
2016-11-29 19:16:16 -06:00
terrafrost
6fb34887c5
SFTP: change queue size to 32 (max packet size is 32kb so 32*32=1M)
2016-11-20 18:13:01 -06:00
terrafrost
a2d9622bf9
SFTP: update directory deletion check ( #1059 )
2016-11-20 18:03:01 -06:00
terrafrost
7cb66ea56e
SSH2: don't use timeout value of 0 for fsockopen
2016-11-20 11:08:53 -06:00
terrafrost
48cf16599b
suppress unpack() PHP warnings
2016-11-19 22:39:36 -06:00
terrafrost
b70cb87641
SFTP: don't delete directory if $path is empty
2016-11-19 20:39:05 -06:00
terrafrost
535104cb84
SSH2: send the identifier first, before reading it
2016-11-08 09:11:57 -06:00
terrafrost
ff7bc85a8f
SFTP: backport "parallel" upload code from master branch
2016-09-11 21:11:52 -07:00
terrafrost
845135f887
add PHP5-style constructors along side PHP4-style ones
2016-09-10 10:41:05 -07:00
Michel Bardelmeijer
1eda62913a
Handle empty fread return correctly which resolves zero-byte file issues
2016-08-28 23:16:53 -05:00
klemens
dca95ac662
spelling fixes
2016-08-04 00:19:27 -05:00
terrafrost
cb4a6df10c
SFTP: make symlink support relative target's
2016-07-10 13:11:24 -05:00
terrafrost
7bc0e61c1d
SSH2: fix "Expected SSH_FXP_STATUS or ..." error
2016-06-29 00:30:28 -05:00
Mathieu Pipet
6c8affcf11
fixed sending stream resulting in a zero byte file
2016-06-19 19:44:06 -05:00
terrafrost
27d9bde6d2
Merge branch 'sftp_readable_writable-1.0' into 1.0
2016-05-06 11:55:50 -05:00
artyhedgehog
0dd04d1e9b
Fixed confusing SSH2::getErrors return type
2016-05-06 11:49:24 -05:00
terrafrost
e762b0dc29
SFTP: add is_writable, is_writeable and is_readable
2016-05-05 16:41:15 -05:00
terrafrost
d22bcd63cc
SFTP: nlist() on a non-existent directory resulted in error
2016-04-11 15:18:06 -05:00
terrafrost
1be0ac9f7f
SFTP/Stream: fix issue with filenames with hash in them
2015-12-23 13:13:06 -06:00
terrafrost
57063f3604
SSH2: add isAuthenticated() method
2015-12-15 23:19:05 -06:00
terrafrost
ee0f45fea6
update identifier to current version
2015-12-05 10:33:28 -06:00
splitice
77d5f8da20
Fix PHP invalid index warning
2015-11-24 09:13:30 +01:00
Bob4ever
b67c690498
Fixed a bug in SFTP::chmod not using realpath on the filepath
2015-10-19 00:05:02 +02:00
terrafrost
2048a49aac
use self:: in phpdoc comments to reduce merge conflicts
2015-10-11 12:22:07 -05:00
terrafrost
19229ed224
phpDoc changes
2015-10-05 13:22:51 -05:00
terrafrost
6688f650f1
SFTP: don't start in local file middle when uploading to middle of
...
the remote file
2015-09-29 21:39:35 -05:00
terrafrost
e2a2ad8c91
SFTP: backport DavidAnderson684's changes to 1.0 branch
2015-09-27 10:56:05 -05:00
Graham Campbell
dd031a1702
PHPDoc fixes
2015-09-06 12:28:08 +01:00
Graham Campbell
cd0e10cf9d
Fixed lots of phpdoc typos
2015-09-02 00:37:54 +01:00
Graham Campbell
5890f3da98
Fixed invalid param phpdoc
2015-09-02 00:22:30 +01:00
Andreas Fischer
65010d08e6
Add encryption_algorithm_to_key_size method.
2015-07-24 12:31:50 +02:00
Andreas Fischer
06ec04e3fe
Merge pull request #746 from terrafrost/ssh-custom-socket-1.0
...
SSH2: make it so you can connect using open sockets / 1.0 branch
* terrafrost/ssh-custom-socket-1.0:
SSH2: move where $host is defined
SSH2: make it so you can connect using open sockets
2015-07-21 12:53:24 +02:00
Andreas Fischer
1473da35e6
SSH2: Introduce _array_intersect_first function.
...
+ No more empty for-loop bodies
+ No more counting variables $i leaked into outer context
+ No more unintuitive $i == count(...) comparisons
+ No more array / hash table access of the form $kex_algorithms[$i]
- Function call overhead; not in the performance critical path, though.
2015-07-17 22:28:32 +02:00
terrafrost
a19e2a0d21
SSH2: move where $host is defined
2015-07-17 13:08:24 -05:00
terrafrost
33a97391bc
SSH2: make it so you can connect using open sockets
2015-07-17 12:30:44 -05:00
Andreas Fischer
2013a31ecd
Use phpcbf to fix PHP code to ruleset.
2015-07-17 12:57:41 +02:00
terrafrost
862b63e9e5
SFTP: stat cache updates
2015-07-17 12:34:56 +02:00
terrafrost
4dc79b96ed
SSH2: limit the size of data that expect() looks at
2015-07-14 19:05:52 -05:00
Andreas Fischer
cdda621903
Merge pull request #714 from bantu/diffie-hellman-group-exchange-sha256
...
Add support for RFC 4419: diffie-hellman-group-exchange-sha{1,256}
* bantu/diffie-hellman-group-exchange-sha256:
Add support for RFC 4419: diffie-hellman-group-exchange-sha{1,256}
2015-07-08 15:43:46 +02:00
Andreas Fischer
abeda5237f
Add support for RFC 4419: diffie-hellman-group-exchange-sha{1,256}
2015-07-08 00:00:40 +02:00
Andreas Fischer
7f1dfba50d
Merge pull request #730 from terrafrost/disable-stat-cache-1.0
...
SFTP: don't update stat cache when it's been disabled
* terrafrost/disable-stat-cache-1.0:
SFTP: don't update stat cache when it's been disabled
2015-07-06 23:48:28 +02:00
Andreas Fischer
643103449c
Merge pull request #731 from terrafrost/sftp-recur-delete-stat-cache-1.0
...
SFTP: delete stat cache for recursive deletes / 1.0 branch
* terrafrost/sftp-recur-delete-stat-cache-1.0:
SFTP: update how recursive delete's update stat cache
Tests/SFTP: add unit test
2015-07-06 23:37:55 +02:00
terrafrost
c460e511a0
SFTP: update how recursive delete's update stat cache
2015-07-04 13:09:26 -05:00
terrafrost
109ae38e48
SFTP: don't update stat cache when it's been disabled
2015-07-04 12:19:35 -05:00
Andreas Fischer
727677d4e1
Merge pull request #713 from bantu/SFTPStreamTest
...
[1.0] Various fixes to fopen mode handling in SFTP Stream
* bantu/SFTPStreamTest:
Explicitly set size to 0 when creating or truncating.
mode[0] of 'c' is not supposed to truncate.
Need to create the file when it does not exist and mode[0] is not 'r'.
Add SFTPStreamTest::testFopenFcloseCreatesFile()
2015-07-04 14:28:06 +02:00
Andreas Fischer
1ad66ad1ea
Merge pull request #719 from terrafrost/lstat-fix-1.0
...
SFTP: update conditions under which cache for lstat / . is used for 1.0 branch
* terrafrost/lstat-fix-1.0:
Tests/SFTP: $lstat->$stat
Tests/SFTP: just check to see that stat / lstat return an array
SFTP: update conditions under which cache for lstat / . is used
Tests/SFTP: add test for stat's on .
2015-06-27 21:59:45 +02:00
terrafrost
d1d415618a
SFTP: update conditions under which cache for lstat / . is used
2015-06-26 23:34:14 -05:00
Andreas Fischer
d71da6b02b
Explicitly set size to 0 when creating or truncating.
2015-06-25 14:26:35 +02:00
Andreas Fischer
9e07fb704b
mode[0] of 'c' is not supposed to truncate.
2015-06-25 14:24:58 +02:00
Andreas Fischer
f0957021a1
Need to create the file when it does not exist and mode[0] is not 'r'.
2015-06-25 14:24:18 +02:00
terrafrost
c0555581e7
SSH2: fix for window sizes > 2,147,483,648
2015-06-24 23:45:14 -05:00
terrafrost
6bc3513914
SFTP: stat cache updates
2015-06-20 19:33:19 -05:00
terrafrost
2fee2d4f98
backport e3betht's PR to 1.0
2015-05-07 00:26:39 -05:00
Andreas Fischer
5bd7a73a71
Merge pull request #674 from terrafrost/ssh2-global-request
...
fix E_NOTICE with SSH2 global requests
* terrafrost/ssh2-global-request:
SSH2: string shift by 4 instead of by 1
SSH2: fix E_NOTICE involving global requests
2015-05-05 16:14:12 +02:00
terrafrost
684d6eed0e
SSH2: string shift by 4 instead of by 1
2015-05-04 08:22:27 -05:00
Andreas Fischer
5d2590feb0
Replace ; with : in case statement.
2015-05-03 13:18:23 +02:00
andrey012
e7719f765c
callbacks - two PRs conflict sorted out.
...
First one: e9b698fd65
, fba6894474
, 1cd286642e
Second one: 16430d4d2e
, 0cc6125f87
2015-05-02 15:27:57 +03:00
andrey012
f4a93c790f
Merge branch '1.0' into sftp-put-callback-for-1.0
2015-05-02 15:24:31 +03:00
andrey012
0cc6125f87
documentation fix
2015-05-02 14:28:19 +03:00
terrafrost
b59d821bbe
SSH2: fix E_NOTICE involving global requests
2015-04-30 21:34:07 -05:00
terrafrost
1d772c3a6f
Merge remote-tracking branch 'audrey/sftp-put-callback-for-1.0' into 1.0
2015-04-16 07:45:24 -05:00
terrafrost
9f626c67b6
Merge remote-tracking branch 'graham/1.0-phpdoc' into 1.0-phpdoc
2015-04-16 00:31:54 -05:00
terrafrost
b47813cf47
Merge remote-tracking branch 'DavidAnderson84/patch-4' into 1.0
2015-04-15 23:52:00 -05:00
andrey012
16430d4d2e
support for callback function for SFTP::put function - in order to pipe data directly to remote server without putting it into file or keeping in memory. This can be useful particularly for dumping big databases directly to remote server.
2015-04-15 03:29:01 +03:00
terrafrost
e510dc878b
Merge branch '1.0' of https://github.com/phpseclib/phpseclib into openssl-support
...
Conflicts:
phpseclib/Net/SSH2.php
2015-04-02 05:40:14 -05:00
Andreas Fischer
c0370ee91d
Merge pull request #639 from terrafrost/banner-timeout
...
improve error handling with protocol version exchange
* terrafrost/banner-timeout:
SSH2: rm unused $connectionTimeout variable
SSH2: rm redundant code and make php4 compatable
SSH2: timeout improvements
2015-03-30 12:37:46 +02:00
Graham Campbell
e50cbacd4e
Fixed some phpdocs
2015-03-29 17:07:17 +01:00
terrafrost
bb01002233
Merge remote-tracking branch 'agentforwarding/feature/ssh_agent_forwarding' into agentforwarding-1.0
2015-03-28 21:03:17 -05:00
terrafrost
1294b08675
SSH2: rm unused $connectionTimeout variable
2015-03-27 22:32:38 -05:00
montdidier
9723acc885
preference isset over array_key_exists, return false on failure, break after return channel opened
2015-03-24 13:38:56 +08:00
terrafrost
dfd57dfb89
SSH2: rm redundant code and make php4 compatable
2015-03-19 22:39:43 -05:00
terrafrost
23c65c3839
SSH2: timeout improvements
...
make it so that the timeout in the constructor behaves in the same
way that timeout's set via setTimeout() do. eg. isTimeout() tells
you if a timeout was thrown etc.
2015-03-19 07:53:19 -05:00
montdidier
1803bcac0b
moved agent forwarding channel handling to filter method and reusing existing open channels to request forwarding
2015-02-06 11:28:23 +08:00
terrafrost
009d883d4c
Merge branch 'master' of https://github.com/phpseclib/phpseclib into openssl-support
2015-01-14 20:13:08 -06:00
montdidier
dd0b3e6bd5
addresses low hanging fruit comments from terrafrost and bantu
2015-01-12 17:13:33 +08:00
Andreas Fischer
3c99773184
Merge pull request #588 from terrafrost/disconnect-fix
...
SSH2: update conditions under which _disconnect's code is executed
* terrafrost/disconnect-fix:
SSH2: update conditions under which _disconnect's code is executed
2015-01-04 11:57:52 +01:00
terrafrost
c6c1e8dcb0
Merge branch 'master' of https://github.com/phpseclib/phpseclib into openssl-support
2014-12-31 14:38:22 -06:00
terrafrost
be168e262f
Crypt/Base: stream ciphers cannot be run in continuous mode with OpenSSL
2014-12-31 14:10:53 -06:00
terrafrost
5a91539148
SSH2: rm unsupported algorithms if OpenSSL is being used
2014-12-29 22:10:26 -06:00
montdidier
aca4ba3286
SSH agent forwarding implementation
2014-12-30 10:44:31 +08:00
terrafrost
472e006b6c
SSH2: update conditions under which _disconnect's code is executed
2014-12-29 08:37:44 -06:00
Graham Campbell
bd0537fec5
"@access static" isn't a thing
2014-12-27 15:38:14 +00:00
David Anderson
1cd286642e
Change dochint as requested
2014-12-27 14:10:44 +00:00
David Anderson
fba6894474
Add docblock
2014-12-27 14:02:29 +00:00
David Anderson
e9b698fd65
Add callback to SFTP.php
...
Currently, Net_SCP::put() has a callback parameter, allowing the consumer to monitor/log/report progress (or whatever they please).
This patch adds the same feature, working in the same way, to Net_SFTP::put()
2014-12-27 13:55:00 +00:00
Clint Nelissen
01d7c96a11
Fix undefined $raw error
2014-12-26 10:37:46 +01:00
terrafrost
c5f74eb3a3
Merge branch 'master' of https://github.com/phpseclib/phpseclib into openssl-support
2014-12-13 14:15:34 -06:00
Andreas Fischer
0efae5a91e
Change copyright years from roman numeral to decimal numbers.
2014-12-10 00:04:08 +01:00
terrafrost
96eb1f3797
SSH2: simplify _send_channel_packet
...
the last _send_channel_packet was unnecessarily complex. this lead
to a number of problems. for example,
the window size was checked for adjustments in two places. in the
second place it receives a window adjustment packet and just assumes
that the window adjustment packet was big enough for the rest of the
data.
(thanks, pixall!)
2014-12-05 22:01:39 -06:00
Andreas Fischer
262da528a0
Merge pull request #527 from DavidAnderson684/patch-2
...
Quote shell argument with escapeshellarg()
* DavidAnderson684/patch-2:
Quote shell argument with escapeshellarg()
2014-12-04 20:00:41 +01:00
Andreas Fischer
f40bb9190f
SCP: Add missing space after case statement.
2014-12-04 18:42:47 +01:00
David Anderson
14dc468b70
Quote shell argument with escapeshellarg()
...
Currently, the call to "scp -t" or "scp -f" just uses naive quoting - i.e. a couple of quote marks are thrown in.
But, this can easily be escaped from - if the filename has a quote mark of its own in it, for example.
e.g. if the filename is as follows, then bad things will happen:
";rm -rf /
Instead, escapeshellarg should be used, to make sure it gets escaped properly.
2014-12-04 16:50:23 +00:00
David Anderson
647a1e9a5e
Avoid calling fclose(false)
...
The previous code would always call fclose(false) if the file was not successfully opened - resulting in a PHP notice.
2014-12-03 19:29:46 +00:00
terrafrost
8fc4f4b70c
Merge branch 'master' of https://github.com/phpseclib/phpseclib into openssl-support
2014-11-29 07:46:06 -06:00
terrafrost
b1e6643032
SSH2: clarify exec() docblock comment
2014-11-19 22:38:19 -06:00
terrafrost
3eac2582d6
SSH2: fix issues with RSA key verification
...
Sometimes SSH servers will null pad their RSA keys. this null padding
broke Net/SSH2.php's RSA implementation (Crypt/RSA.php's implementation
works just fine). Also, the -3 was counting the initial "\0" of $h
twice so adjust it to -2.
2014-11-06 11:58:03 -06:00
Andreas Fischer
5c3058cc4b
SFTP: Use hexdec() and bin2hex() for filesize calculation.
2014-10-19 21:07:12 +02:00
Andreas Fischer
5b932495cc
SFTP: Replace incorrect comment about filesize. There is no 4 GiB limit.
2014-10-15 17:27:48 +02:00
terrafrost
361b59fff9
SSH2: make setCryptoEngine() less cumbersome
2014-10-11 23:40:56 -05:00
terrafrost
959c0cefae
SSH2: add setCryptoEngine() function
2014-10-11 23:26:46 -05:00
terrafrost
ff4d563f4f
SSH2: CS adjustments
2014-10-11 23:20:44 -05:00
Andreas Fischer
ce3cf60b10
Correct constant: NET_SFTP_BLOCK_DEVICE -> NET_SFTP_TYPE_BLOCK_DEVICE
2014-10-09 23:24:30 +02:00
Vladimir Volodko
6715c41e1f
Fix Net_SFTP::filetype() block device recognition.
2014-10-09 12:46:58 +07:00
Cezary Kluczyński
0692a1ea7d
SSH2: removed redundant rtrim
2014-09-28 12:39:54 +02:00
terrafrost
67279d7811
SSH2: rm unused constant
...
it doesn't need to be defined since the strlen($this->last_interactive_response)
check in _login_helper serves the same purpose that NET_SSH_MASK_LOGIN_INTERACTIVE
was intended to serve
2014-09-06 20:30:01 -05:00
terrafrost
9e71e0bce8
SSH2: don't count data length against window size
...
it is my hope that the issues 8c9e7a890e
and ccb1c3e2bd
sought to resolve were
fixed 9f8d8a7bf6
and
7a2c7a414c
.
2014-08-30 15:26:23 -05:00
terrafrost
74feca9cf2
SFTP: cs adjustment
2014-08-19 14:20:20 -05:00
terrafrost
cb66c561c2
SFTP: optimize conditional calls to fclose in get() method
2014-08-19 14:05:24 -05:00
terrafrost
29e0143308
SFTP: grammar
2014-08-16 15:49:38 -05:00
terrafrost
7ed53f2428
SFTP: fix issue with uploading via a resource
2014-08-16 13:56:34 -05:00
terrafrost
e48ee12940
SFTP: make it so files can be downloaded into resources or upload
...
from resources
2014-08-16 12:49:55 -05:00
Andreas Fischer
1de939fb4a
Merge pull request #427 from terrafrost/ssh2-show-methods-before-login
...
SSH2: make it so negotiated algorithms can be seen before login
* terrafrost/ssh2-show-methods-before-login:
SSH2: white space adjustment
SSH: update getServerPublicHostKey() to use new _connect() method
SSH2: fix if statement for conditional _connect() call
simplify calls to $this->_connect()
SSH2: make it so negotiated algorithms can be seen before login
2014-08-10 12:10:04 +02:00
terrafrost
04e263bb8c
SSH2: white space adjustment
2014-08-10 02:09:28 -05:00
terrafrost
085fb0ebb8
SSH: update getServerPublicHostKey() to use new _connect() method
2014-08-06 14:42:08 -05:00
terrafrost
5b019b22d9
SSH2: fix if statement for conditional _connect() call
2014-08-05 19:30:14 -05:00
terrafrost
dffef50838
simplify calls to $this->_connect()
2014-08-04 20:11:34 -05:00
Andreas Fischer
2ccb301c4c
Merge pull request #425 from bantu/ssh-remove-none-mac
...
SSH2: Disallow the none MAC.
* bantu/ssh-remove-none-mac:
SSH2: Disallow the none MAC.
2014-07-26 13:14:39 +02:00
Andreas Fischer
4be4533a6e
ssh-hmac-sha2-256: Remove whitespace at end of line.
2014-07-26 13:02:52 +02:00
terrafrost
49079fa1b4
SSH2: make it so negotiated algorithms can be seen before login
2014-07-25 10:03:31 -05:00
Dag Wieers
1a330b68e2
Added RFC6668
...
Added the requested changed.
2014-07-25 14:10:01 +02:00
Dag Wieers
86d17c6989
Add hmac-sha2-256 MAC support
...
This small patch adds hmac-sha2-256 support separately as requested in #423 .
Some security standards now recommend to disable MD5 and SHA1, and use SHA2 instead. This change was tested using SHA2 against RHEL6's OpenSSH v5.3p1 and Solaris 11. And was also tested with RHEL5's OpenSSH 4.3p2 which doesn't include SHA2.
2014-07-25 12:28:08 +02:00
Andreas Fischer
1aecc5e3d8
SSH2: Disallow the none MAC.
2014-07-25 12:18:11 +02:00
Andreas Fischer
880bc9d9e6
Merge pull request #420 from bantu/sftp-skip-current-dir-by-removal
...
SFTP: Do not check filename over and over again, remove '.' and '..' from the map instead.
* bantu/sftp-skip-current-dir-by-removal:
Do not check filename over and over again, remove '.' and '..' from the map instead.
2014-07-24 17:32:38 +02:00
Andreas Fischer
48a2613cde
Merge pull request #421 from bantu/issue/418
...
SFTP: Only fclose($fp) when $mode & NET_SFTP_LOCAL_FILE.
* bantu/issue/418:
Only fclose($fp) when $mode & NET_SFTP_LOCAL_FILE.
2014-07-24 17:04:24 +02:00
Andreas Fischer
952d2166bf
Net_SFTP::_list() only takes two parameters.
2014-07-24 11:09:37 +02:00
Andreas Fischer
695d1e9038
Only fclose($fp) when $mode & NET_SFTP_LOCAL_FILE.
2014-07-24 11:06:24 +02:00
Andreas Fischer
84a9a300d4
Do not check filename over and over again, remove '.' and '..' from the map instead.
2014-07-24 11:00:55 +02:00
Andreas Fischer
a0a23cbaf1
Merge pull request #406 from bantu/remove-ssh-arcfour
...
Remove the arcfour and none ciphers from SSH2.
* bantu/remove-ssh-arcfour:
Comment out (potentially) insecure ciphers arcfour and none.
2014-07-22 16:09:14 +02:00
terrafrost
9dd3db4a49
SSH2: don't remove old $this->bitmap values
2014-07-21 16:41:39 -05:00
Andreas Fischer
84ac305704
Comment out (potentially) insecure ciphers arcfour and none.
2014-07-21 12:16:49 +02:00
Andreas Fischer
678d0cc792
Make Net_SSH2::isConnected() return a boolean instead of int.
2014-07-20 23:03:06 +02:00
Andreas Fischer
cc64ef9d3f
Merge pull request #412 from terrafrost/ssh2-connected
...
SSH2: make isConnected return true if even if we're not logged in
* terrafrost/ssh2-connected:
SSH2: make isConnected return true if even if we're not logged in
2014-07-20 23:00:30 +02:00
terrafrost
ac2fc96263
SSH2: make isConnected return true if even if we're not logged in
2014-07-20 11:24:16 -05:00
terrafrost
a84861bb52
SFTP: stat cache fixes
2014-07-19 21:31:58 -05:00
terrafrost
fe7fd97b59
SFTP: fix an issue with the stat cache
2014-07-11 12:14:26 -05:00
Andreas Fischer
ba24e04729
Merge pull request #394 from terrafrost/scp-spaces
...
SCP: add support for file names with spaces
* terrafrost/scp-spaces:
SCP: always encapsulate filenames within double quotes
SCP: add support for file names with spaces
2014-07-05 17:40:01 +02:00
terrafrost
aec33901fc
SCP: always encapsulate filenames within double quotes
2014-07-03 13:36:24 -05:00
terrafrost
9edf905939
SCP: add support for file names with spaces
2014-06-26 20:41:43 -05:00
Andreas Fischer
0f672dde52
Use get_called_class() if available.
2014-06-27 00:35:19 +02:00
Andreas Fischer
73f961cb7d
Add Net_SFTP_Stream::register() for easier autoloading.
2014-06-27 00:22:41 +02:00
Andreas Fischer
949cfcc867
Merge pull request #386 from terrafrost/symlink
...
SFTP: add readlink and symlink functions
* terrafrost/symlink:
SFTP: return $sftp object in unit tests
SFTP: fix unit test
SFTP: syntax error in unit test
SFTP: add unit tests for symlinks
SFTP: add readlink and symlink functions
2014-06-23 16:37:55 +02:00
liutec
10597aed64
Removed white-spaces from line ends
2014-06-22 22:30:52 +03:00
liutec
8e1df6e3c3
Allow setting the terminal window size
2014-06-20 13:04:17 +03:00
Andreas Fischer
709c7c4d48
Merge pull request #385 from bantu/a-random-change
...
Random: include the Crypt_* classes if they're available
* bantu/a-random-change:
phpseclib_is_includable() -> phpseclib_resolve_include_path()
Drop Net_SSH2::_is_includable() method.
Random: a few changes to the stream_resolve_include_path_function
Replace stream_resolve_include_path with phpseclib_is_includable.
Random: add explanatory comment
SSH2: replace _is_includable() with stream_resolve_include_path
Random: include the Crypt_* classes if they're available
2014-06-19 16:08:59 +02:00
Andreas Fischer
fd65c55720
phpseclib_is_includable() -> phpseclib_resolve_include_path()
2014-06-19 14:57:09 +02:00
Andreas Fischer
1afbea613d
Drop Net_SSH2::_is_includable() method.
2014-06-18 23:41:26 +02:00
terrafrost
a65b820b54
SFTP: add readlink and symlink functions
2014-06-18 11:34:50 -05:00
Andreas Fischer
9c90beaf82
Replace stream_resolve_include_path with phpseclib_is_includable.
2014-06-17 14:38:24 +02:00
terrafrost
5f56781261
SSH2: make it so you can verify server public host key without logging on
2014-06-16 10:19:34 -05:00
terrafrost
4401b7e21e
SSH2: replace _is_includable() with stream_resolve_include_path
2014-06-16 09:47:13 -05:00
terrafrost
246e9e154f
SSH2: make $mac_algorithms non-static
...
none of the other statically defined variables have the potential
to change as multiple Net_SSH2 objects are created but this one does.
ie. if you connect to one SSH-2.0-SSHD server then no subsequent server
will use hmac-sha1-96 even if it could
2014-06-10 23:08:56 -05:00
terrafrost
0e2b2a416b
SFTP: reset sort options every time and update unit test
2014-06-09 09:22:30 -05:00
terrafrost
8dff207ed3
SFTP: rm whitespace
2014-06-05 15:06:50 -05:00
terrafrost
8c0f710083
SFTP: define $sortOptions
2014-06-05 10:50:13 -05:00
terrafrost
b64573f4b5
SFTP: add the ability for nlist() and rawlist() to be sorted
2014-06-05 09:56:49 -05:00
Andreas Fischer
e6f87318f5
Adjust documentation to coding guidelines: No () around include.
2014-06-01 23:28:49 +02:00
terrafrost
7252017268
SFTP/Stream: fix capatilization
2014-05-29 16:49:04 -05:00
terrafrost
c0e3795319
SFTP/Stream: add explanation as to why nlist() is used here
2014-05-29 16:23:28 -05:00
terrafrost
3dd92e56e4
SFTP/Stream: use $scheme instead of 'sftp'
...
This makes it easier for someone to change the scheme (which can be
done by changng the stream_wrapper_register call at the bottom
of the file)
2014-05-29 16:14:03 -05:00
Andreas Fischer
aa5f9b77ec
Merge pull request #349 from terrafrost/ssh2-exec-callback-termination
...
SSH2: make it so callback functions can make exec() return early
* terrafrost/ssh2-exec-callback-termination:
SSH2: 0x7FFFFFFF -> $this->window_size in one more place
SSH2: make it so callback functions can make exec() return early
2014-05-28 00:39:40 +02:00
terrafrost
db32efb276
SSH2: 0x7FFFFFFF -> $this->window_size in one more place
2014-05-26 17:57:14 -05:00
terrafrost
0dd929341b
SSH2: make it so callback functions can make exec() return early
2014-05-26 17:37:32 -05:00
terrafrost
c100264b65
SFTP: NULL -> null
2014-05-26 16:32:57 -05:00
terrafrost
46ae0da314
SFTP: fix syntax error
2014-05-26 15:42:14 -05:00
terrafrost
a7fa4cc4ff
SFTP: add more stat functions
...
also don't use stat cache for SFTP/Stream.php
2014-05-26 15:39:30 -05:00
Andreas Fischer
f1fbf9c5ae
SFTP: Use the correct stat cache property: stat_cache
2014-05-22 13:32:39 +02:00
terrafrost
1ddcd6d873
SFTP: last commit had a few ommissions
2014-05-21 19:55:12 -05:00
terrafrost
4d9214970b
SFTP: stat cache updates
2014-05-21 10:20:36 -05:00
terrafrost
36fa9e4e48
SFTP: use_cache -> use_stat_cache
2014-05-18 15:55:12 -05:00
terrafrost
e09a6968da
SFTP: switch from using file existence cache to stat cache, like PHP
...
also add a few new functions - is_link and filesize
2014-05-18 15:34:10 -05:00
terrafrost
0a0398268a
SFTP: add support for recursive nlist and rawlist
2014-05-13 17:10:32 -05:00
terrafrost
77641003fa
SFTP: add file_exists, is_dir and is_file functions
...
also expand caching layer
2014-05-10 19:52:38 -05:00
terrafrost
efd3b96dc8
SSH2: improve handling of incomplete packets
2014-04-18 16:58:00 -05:00
Andreas Fischer
b676cc2690
Merge pull request #241 from mpscholten/ssh2-tests
...
Added some simple Net_SSH2 tests
* mpscholten/ssh2-tests:
Added some simple Net_SSH2 tests
Conflicts:
tests/Net/SSH2Test.php
2014-04-18 16:54:24 +02:00
terrafrost
79719e8f74
SSH2: move _connect() call to _login() from login()
...
Per bantu, this is required for it to work with Net/SFTP.php
2014-04-08 08:48:12 -05:00
terrafrost
0ad0bb4c37
SSH2: phpdoc updates
2014-04-07 15:43:31 -05:00
terrafrost
677a291cb3
SSH: clarify role of constructor / connection timeout
...
Also, in Net_SSH2::_connect() $host is used in multiple places. Rather than changing all references to {$this->host}:{$this->port} preserve existing $host reference and update it accordingly
2014-04-07 10:26:46 -05:00
terrafrost
24bb941799
SSH1: do fsockopen() call when login has been called
2014-04-07 00:30:50 -05:00
terrafrost
6fcfe5c885
SSH2: != -> |=
2014-04-07 00:25:38 -05:00
terrafrost
8f08301744
SSH2: phpdoc changes
2014-04-07 00:19:35 -05:00
terrafrost
ab341df973
SSH2: syntax error
2014-04-07 00:16:54 -05:00
terrafrost
f27a49299e
SSH2: timeout set in constructor != timeout set by setTimeout()
2014-04-07 00:02:03 -05:00
terrafrost
fc748346fc
SSH2: add phpdoc header
2014-04-06 23:56:21 -05:00
terrafrost
a14e71f38b
SSH2: connect to server in login() function
...
this change will make it so some parameters can be set after the
Net_SSH2 object has been created. eg. instead of doing
define('NET_SSH2_LOGGING', NET_SSH2_LOG_COMPLEX) one can now do
$ssh->setLogging(...) or something.
2014-04-06 23:45:25 -05:00
terrafrost
7a2c7a414c
fix more ssh channel issues
...
In logs that were provided to me phpseclib sent a packet that was 2536 bytes long (excluding the bytes denoting the channel and data length) but the length packet said it was 32764 bytes long (ie. $max_size).
So when $max_size is less than the data being sent and has to be adjusted by a new window adjust message from the server and the adjustment makes $max_Size bigger than the data being sent over problems arise.
SSH's window size has caused issues before. Overall I don't think the SSH specs really explain the window size very well. I opened up an errata on SSH's RFC a while back about the issue.
2014-03-21 02:53:43 -05:00
Andreas Fischer
fb1296bbec
Drop meaningless, outdated, inconsistent version tags in doc blocks.
...
find phpseclib -type f -name "*.php" -exec sed -i '/@version/d' {} \;
2014-03-11 15:58:33 +01:00
Nicky Gerritsen
b5e579f6c0
Also replace this with call_user_func
2014-03-05 18:38:33 +01:00
Nicky Gerritsen
97d1e75a51
Use call_user_func, as this will work on PHP < 5.4, whereas $callback() does not
2014-03-05 15:44:17 +01:00
terrafrost
e90648c7a5
SSH2: add ssh-agent support
2014-02-10 00:04:16 -06:00
Andreas Fischer
f4dbcb1b78
Merge pull request #264 from terrafrost/exit-status
...
SSH2: ignore exit_status channel requests
* terrafrost/exit-status:
SSH2: ignore exit_status channel requests
2014-02-03 16:56:36 +01:00
terrafrost
cd9801db8a
SSH2: ignore exit_status channel requests
...
Fixes #258
2014-02-02 23:42:06 -06:00