Commit Graph

573 Commits

Author SHA1 Message Date
terrafrost
7e67f882ee Merge branch '1.0-mkdir-mode-adjustment' into 2.0-mkdir-mode-adjustment 2020-03-28 18:05:49 -05:00
terrafrost
5e2951f83a SFTP: change the mode with a SETSTAT instead of MKDIR 2020-03-28 18:04:26 -05:00
terrafrost
ef04a176dd Merge branch '2.0' into 3.0 2020-03-09 20:02:17 -05:00
terrafrost
63a76e88a1 Merge branch '1.0' into 2.0 2020-03-09 19:49:37 -05:00
terrafrost
229f6af1ca SFTP: re-use SSH2 login method 2020-03-09 19:49:20 -05:00
terrafrost
053e856a47 Merge branch '2.0-speed-up-uploads' into 3.0-speed-up-uploads 2020-02-25 20:45:18 -06:00
terrafrost
a563ee6704 Merge branch '1.0-speed-up-uploads' into 2.0-speed-up-uploads 2020-02-25 20:42:32 -06:00
terrafrost
08e4096e7c SFTP: speed up uploads 2020-02-25 20:37:20 -06:00
terrafrost
8c8e805c73 Merge branch '2.0' into 3.0 2020-02-25 00:00:25 -06:00
terrafrost
c18159618e Merge branch '1.0' into 2.0 2020-02-24 22:16:50 -06:00
terrafrost
db6ce986f3 Revert "SFTP: don't buffer up download requests (PuTTY doesn't)"
This reverts commit 333e2e4c2b.
2020-02-24 22:14:28 -06:00
terrafrost
8dac275a03 SFTP: rm size() (we already have filesize()) 2020-02-11 23:25:04 -06:00
terrafrost
b95120c808 SFTP: change visibility of sortOptions for phpseclib2_compat 2020-02-11 06:29:21 -06:00
terrafrost
f8685c0577 SFTP: _get_sftp_packet() -> get_sftp_packet() 2020-02-10 21:09:22 -06:00
terrafrost
f44d39fb19 SFTP: rm permissions attribute 2020-02-10 21:05:00 -06:00
terrafrost
be221d8b23 Merge branch '2.0' into 3.0 2019-12-25 17:49:03 -06:00
terrafrost
de4a60de9d Merge branch '1.0' into 2.0 2019-12-25 17:36:31 -06:00
terrafrost
333e2e4c2b SFTP: don't buffer up download requests (PuTTY doesn't) 2019-12-25 11:31:43 -06:00
terrafrost
653dbd7f94 rename phpseclib/phpseclib to phpseclib/phpseclib3 for 3.0 branch 2019-11-21 19:38:03 -06:00
terrafrost
69a11136ae SSH2: ping tweaks 2019-09-10 19:52:35 -05:00
terrafrost
71aa8165fa Merge branch '2.0' 2019-09-10 18:13:12 -05:00
terrafrost
2cf180fb47 Merge branch '1.0' into 2.0 2019-09-10 17:43:41 -05:00
terrafrost
fbf36728fd SSH2 / SFTP: fix issues with ping() 2019-09-10 17:31:43 -05:00
terrafrost
b89c488f43 SFTP: unpack() -> unpackSSH2() 2019-08-22 05:01:33 -05:00
terrafrost
e71f203742 Merge branch 'master-callback' 2019-06-16 15:31:39 -05:00
terrafrost
82454229f6 Merge branch '2.0-callback' into 2.0 2019-06-16 15:31:31 -05:00
terrafrost
f8d8ad24fd Merge branch '1.0-callback' into 1.0 2019-06-16 15:31:22 -05:00
terrafrost
aa8a30cd81 Merge branch '2.0' 2019-06-16 11:04:31 -05:00
terrafrost
0932fb3054 Merge branch '1.0' into 2.0 2019-06-16 11:03:37 -05:00
Rubens Matrono
a7d038830c fix array_merge(): Argument #1 is not an array 2019-06-16 11:03:27 -05:00
terrafrost
30320f5a91 Merge branch '2.0-callback' into master-callback 2019-06-02 08:22:26 -05:00
terrafrost
a0fa38db6d Merge branch '1.0-callback' into 2.0-callback 2019-06-02 08:20:07 -05:00
terrafrost
e988abcdb1 SFTP: add callback parameter to get() 2019-06-02 08:19:41 -05:00
terrafrost
79f925e43c SFTP: replace user_error() with Exceptions 2019-05-28 08:52:53 -05:00
terrafrost
72b4bf74d2 SFTP: use microtime(true) 2019-05-28 08:50:22 -05:00
terrafrost
a773ae80bd Merge branch '2.0' 2019-05-28 08:47:59 -05:00
terrafrost
06ccf5d1f9 Merge branch '1.0' into 2.0 2019-05-28 08:47:51 -05:00
terrafrost
8df35cc368 SFTP: improve handling of malformed packets 2019-05-28 08:47:34 -05:00
terrafrost
cee3f3cd4a SFTP: use Strings::packSSH2() / Strings::unpackSSH2() 2019-04-03 22:09:15 -05:00
terrafrost
d329814f55 SSH2: send_binary_packet() now always throws exceptions on error 2019-03-31 00:33:57 -05:00
terrafrost
8ce392f218 SFTP: nlist() didn't return empty directories - now it does
I view this as a BC breaking change so atm do not plan on
backporting it to 1.0/2.0. eg. now, all subdirectories have . and
.. as "files" whereas before they didn't
2019-03-16 09:41:06 -05:00
terrafrost
496fcd18cd Merge branch '2.0' 2019-03-03 18:42:47 -06:00
terrafrost
03d9efcbc9 Merge branch '1.0' into 2.0 2019-03-03 18:40:36 -06:00
terrafrost
fce6063de6 SFTP: make it so get() can correctly handle out of order responses 2019-03-03 18:38:57 -06:00
Jakub Chábek
bee5fd70d8 Fix invalid method name + usages in comments 2018-09-10 17:20:48 +02:00
terrafrost
6021e74a79 Merge branch '2.0-dsas' 2018-08-18 15:04:51 -05:00
terrafrost
82967a40d4 Merge branch '1.0-dsas' into 2.0 2018-08-18 15:03:25 -05:00
terrafrost
f7f156b537 SFTP: use lstat in rawlist instead of stat 2018-08-18 15:02:42 -05:00
Dean Sas
426dbdbfcd Ensure SFTP::rawlist gives same results regardless of statcache
Previously SFTP::rawlist gave different results depending on whether the
stat cache was enabled or not. With the stat cache turned off it did not
treat directories correctly, as it relied on the stat cache even though
it was not populated.
2018-08-18 08:36:16 -05:00
luz.paz
380517ef00 Misc. trivial typos
Found via `codespell -q 3`
2018-03-03 07:07:14 -05:00
terrafrost
63b6df29a8 Merge branch '2.0' 2018-02-07 21:24:51 -06:00
terrafrost
473c980d0c Merge branch '1.0' into 2.0 2018-02-07 21:23:21 -06:00
terrafrost
1468ef1a23 SFTP: fix issue with extended attribute on 64-bit PHP installs 2018-02-07 21:22:54 -06:00
terrafrost
59faa1d253 Merge branch '2.0' 2018-01-01 13:09:18 -06:00
terrafrost
d0155508e9 Merge branch '1.0' into 2.0 2018-01-01 13:09:05 -06:00
terrafrost
30a11a3951 SFTP: update state cache accordingly when file becomes directory 2018-01-01 13:07:45 -06:00
terrafrost
56a644faa8 replace user_error with exceptions in a few more places 2017-12-23 14:32:22 -06:00
Sokolovskyy Roman
62ee1a5747 Multiline phpdoc for extract to one liner 2017-12-21 10:14:53 +01:00
Sokolovskyy Roman
c705e7d9c6 Add PhpDoc @var for extract() functions 2017-12-04 11:11:43 +01:00
terrafrost
2314b638c7
Merge pull request #1212 from rrran/func_get_args_to_tripple_dots
Get rid of func_get_args()
2017-11-23 10:02:59 -06:00
terrafrost
e2e719ee29 Merge branch '2.0' 2017-11-23 09:37:26 -06:00
terrafrost
6e9ece958b Merge branch '1.0' into 2.0 2017-11-23 09:33:35 -06:00
terrafrost
309fa0af44 SSH/SFTP: more adustments to channel handling 2017-11-23 09:31:34 -06:00
Sokolovskyy Roman
ee8f5e9769 Get rid of func_get_args() 2017-11-21 09:36:28 +01:00
terrafrost
d90e9d1b7a
Merge pull request #1204 from comsolit/feature/show-answer-not-understood
Unveil received value in unexpected value exceptions (SFTP)
2017-11-05 15:16:40 -06:00
terrafrost
ec579bd9ed revisions to rrran's PHPDoc changes 2017-11-05 14:35:27 -06:00
Peter Bittner
31b02fe7cc Unveil received value in unexpected value exceptions (SFTP) 2017-11-02 14:36:22 +01:00
Sokolovskyy Roman
f40ea062c2 Lots of PHPDoc fixes 2017-10-25 11:44:14 +02:00
Sokolovskyy Roman
4f399d5c33 Merge remote-tracking branch 'origin/master' into Bugfixes2 2017-09-11 11:13:03 +02:00
terrafrost
9228d7b5c9 Merge branch '2.0' 2017-09-05 22:00:45 -05:00
terrafrost
a7eb9099f1 Merge branch '1.0' into 2.0 2017-09-05 22:00:35 -05:00
terrafrost
deb485c0e1 SFTP: fix put() with remote file stream resource (#1177) 2017-09-05 21:59:51 -05:00
Sokolovskyy Roman
55cacdf7cd More PHPDOC fixes 2017-08-04 12:06:25 +02:00
Sokolovskyy Roman
0fd58aeb7e Set of PHPDOC fixes
Fixed methods visibility
2017-08-03 09:19:11 +02:00
terrafrost
c5a73e948f Merge branch '2.0' 2017-07-30 10:18:41 -05:00
terrafrost
6922e6d476 Merge branch '1.0' into 2.0 2017-07-30 10:18:31 -05:00
Yannick Breuer
acebfe28d6 DOC: Fix sftp errors var type 2017-07-30 10:18:08 -05:00
terrafrost
03ca09a104 Merge branch '2.0' 2017-06-12 21:26:20 -05:00
terrafrost
53acccdb08 Merge branch '1.0' into 2.0 2017-06-12 21:19:18 -05:00
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
84d40ad8e0 Merge branch '2.0' 2017-05-07 13:26:39 -05:00
terrafrost
64dd2e064b Merge branch '1.0' into 2.0 2017-05-07 13:26:27 -05:00
terrafrost
35a1102c0b SFTP: fix put() with php://input as source 2017-05-07 13:25:43 -05:00
terrafrost
a25c841108 Merge remote-tracking branch 'upstream/master' into php5-updates 2017-01-17 22:40:24 -06:00
terrafrost
b9b4f67a0f Net: add public / private / protected 2017-01-17 10:23:28 -06:00
terrafrost
c852bae3c8 use short array syntax for arrays 2016-11-30 21:29:38 -06:00
terrafrost
e34e5f5135 Merge branch '2.0' 2016-11-29 23:00:03 -06:00
terrafrost
024ac81d04 Merge branch '1.0' into 2.0 2016-11-29 19:26:11 -06:00
terrafrost
d0cb855bbc Merge branch '1.0-suppress-unpack-errors' into 1.0 2016-11-29 19:16:16 -06:00
terrafrost
865904f636 Merge branch '2.0' 2016-11-20 18:13:48 -06:00
terrafrost
de3bb2e300 Merge branch '1.0' into 2.0 2016-11-20 18:13:41 -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
ad03dcad1c Merge branch '2.0' 2016-11-20 18:05:02 -06:00
terrafrost
27a6b6362a Merge branch '1.0' into 2.0 2016-11-20 18:04:55 -06:00
terrafrost
a2d9622bf9 SFTP: update directory deletion check (#1059) 2016-11-20 18:03:01 -06:00
terrafrost
48cf16599b suppress unpack() PHP warnings 2016-11-19 22:39:36 -06:00
terrafrost
b8e1a15291 Merge branch '2.0' 2016-11-19 20:40:04 -06:00
terrafrost
f981310266 Merge branch '1.0' into 2.0 2016-11-19 20:39:58 -06:00
terrafrost
b70cb87641 SFTP: don't delete directory if $path is empty 2016-11-19 20:39:05 -06:00
terrafrost
d1fa327ef9 Merge branch '2.0' 2016-11-18 20:48:18 -06:00
terrafrost
51bafdebe2 SFTP: CS adjustment 2016-11-18 20:48:01 -06:00
terrafrost
d6bf2b4f73 Merge branch '2.0' 2016-11-18 20:37:26 -06:00
terrafrost
8b4208ee60 SFTP: logging didn't work correctly in 2.0 branch 2016-11-18 20:37:08 -06:00
terrafrost
c17a2604a0 Merge branch 'master-reorg' 2016-09-17 09:15:11 -07:00
terrafrost
c1d407d7cf Merge branch '1.0' into 2.0 2016-09-11 21:22:53 -07: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
terrafrost
6f22a957c2 Merge branch '2.0' 2016-08-28 23:17:11 -05:00
terrafrost
f30f8045fd Merge branch '1.0' into 2.0 2016-08-28 23:17:06 -05:00
Michel Bardelmeijer
1eda62913a Handle empty fread return correctly which resolves zero-byte file issues 2016-08-28 23:16:53 -05:00
klemens
dd23d91d41 spelling fixes 2016-08-04 00:47:52 -05:00
terrafrost
c547ee16c7 Merge branch '1.0' into 2.0 2016-08-04 00:31:15 -05:00
klemens
dca95ac662 spelling fixes 2016-08-04 00:19:27 -05:00
terrafrost
c509909004 Organizational Revamp
- rename \phpseclib\Crypt\Base to \phpseclib\Crypt\Common\SymmetricKey
- create BlockCipher and StreamCipher to extend SymmetricKey
- replace _string_shift with \phpseclib\Common\Functions\Strings::shift
2016-07-30 22:18:06 -05:00
terrafrost
f7585d99d1 Merge branch '2.0' 2016-07-10 13:22:09 -05:00
terrafrost
a21f3e5132 Merge branch '1.0' into 2.0 2016-07-10 13:22:03 -05:00
terrafrost
cb4a6df10c SFTP: make symlink support relative target's 2016-07-10 13:11:24 -05:00
terrafrost
15f0c3e5e6 Merge branch '2.0' 2016-06-19 19:45:08 -05:00
terrafrost
eeb65b2341 Merge branch '1.0' into 2.0 2016-06-19 19:45:00 -05:00
Mathieu Pipet
6c8affcf11 fixed sending stream resulting in a zero byte file 2016-06-19 19:44:06 -05:00
Paragon Initiative Enterprises
adcbecae78 Use paragonie/constant_time_encoding 2016-05-21 12:57:53 -05:00
terrafrost
c784d9e1e5 reapply PR #931 2016-05-08 01:34:37 -05:00
terrafrost
43d68c6619 Merge branch '2.0' 2016-05-06 12:23:35 -05:00
terrafrost
700338beed Merge branch '1.0' into 2.0 2016-05-06 11:58:07 -05:00
terrafrost
e762b0dc29 SFTP: add is_writable, is_writeable and is_readable 2016-05-05 16:41:15 -05:00
terrafrost
398a795e1f Revert "undo merging of master to 2.0 branch"
This reverts commit 8fb4c3363d.
2016-04-30 16:23:35 -05:00
terrafrost
8fb4c3363d undo merging of master to 2.0 branch 2016-04-28 15:34:10 -05:00
terrafrost
b3171cc63f SFTP: fix logging constants 2016-04-11 19:30:45 -05:00
terrafrost
076c69fa1b Merge branch '1.0' into 2.0 2016-04-11 15:18:50 -05:00
terrafrost
d22bcd63cc SFTP: nlist() on a non-existent directory resulted in error 2016-04-11 15:18:06 -05:00
terrafrost
b4cf10fc94 Revert "Merge branch '2.0'"
This reverts commit be5f4ef6b19c82f6c898708cc8e1828b05e3d4e8, reversing
changes made to 638fe6971c.
2016-04-10 11:30:59 -05:00
terrafrost
4b69dcb1ca Revert "Merge remote-tracking branch 'bantu/bootstrap'"
This reverts commit ef04c870e9, reversing
changes made to cd57bf31ae.
2016-04-10 11:25:31 -05:00
terrafrost
6d5ec59f10 SFTP: a few tweaks to the queue'd get() changes raxbg did 2016-03-14 09:57:54 -05:00
Ivailo Hristov
75d4c3b09c Even more memory optimizations 2016-02-25 13:55:49 +02:00
Ivailo Hristov
1af19fbf1b Fix a memory leak when transferring lots of small files 2016-02-24 17:01:40 +02:00
Ivailo Hristov
56af770943 Changes based on comment 187537999 2016-02-23 19:21:23 +02:00
Ivailo Hristov
83b8d0ec0a Bug fix for SFTP::get() 2016-02-17 14:57:32 +02:00
Ivailo Hristov
11a539bcbd Implement parallel download 2016-02-11 16:38:31 +02:00
terrafrost
cd700ce8b3 Merge branch '2.0' 2016-01-25 16:58:48 -06:00
Joey3000
bdc28b9453 Cherry-picking cleanup of use operator usage
Picked c9a80ff748 to the 2.0 branch and resolved conflicts.
2016-01-21 19:41:41 +01:00
Andreas Fischer
a88047f242 Merge branch '2.0'
* 2.0:
  Add test case for GitHub Issue 850: Realpath in SFTP chmod().
  Fixed a bug in SFTP::chmod not using realpath on the filepath
2015-10-19 00:19:08 +02:00
Andreas Fischer
1cf70d27e8 Merge branch '1.0' into 2.0
* 1.0:
  Add test case for GitHub Issue 850: Realpath in SFTP chmod().
  Fixed a bug in SFTP::chmod not using realpath on the filepath
2015-10-19 00:19:07 +02:00
Bob4ever
b67c690498 Fixed a bug in SFTP::chmod not using realpath on the filepath 2015-10-19 00:05:02 +02:00
terrafrost
8686ced6d3 Merge branch 'phpdoc-2.0' into phpdoc-master
Conflicts:
	phpseclib/Crypt/Hash.php
	phpseclib/Crypt/RSA.php
2015-10-12 21:37:44 -05:00
terrafrost
33ea01f1ac Merge branch 'phpdoc-1.0' into phpdoc-2.0
Conflicts:
	phpseclib/Crypt/AES.php
	phpseclib/Crypt/Base.php
	phpseclib/Crypt/Blowfish.php
	phpseclib/Crypt/DES.php
	phpseclib/Crypt/Hash.php
	phpseclib/Crypt/RC2.php
	phpseclib/Crypt/RC4.php
	phpseclib/Crypt/RSA.php
	phpseclib/Crypt/Rijndael.php
	phpseclib/Crypt/TripleDES.php
	phpseclib/Crypt/Twofish.php
	phpseclib/File/ASN1.php
	phpseclib/File/X509.php
	phpseclib/Math/BigInteger.php
	phpseclib/Net/SCP.php
	phpseclib/Net/SFTP.php
	phpseclib/Net/SSH1.php
	phpseclib/Net/SSH2.php
	phpseclib/System/SSH/Agent.php
2015-10-12 14:10:26 -05:00
terrafrost
2048a49aac use self:: in phpdoc comments to reduce merge conflicts 2015-10-11 12:22:07 -05:00
Andreas Fischer
0ba1a04c05 Merge branch '2.0'
* 2.0:
  SFTP: don't start in local file middle when uploading to middle of the remote file
  Tests/SFTP: updates to newly added unit test
  SFTP: backport DavidAnderson684's changes to 1.0 branch
  add unit test demo'ing issue # 830
2015-09-30 17:28:03 +02:00
terrafrost
0f49fb86bf Merge branch 'sftp-endless-loop' into sftp-endless-loop-v2
Conflicts:
	phpseclib/Net/SFTP.php
	tests/Functional/Net/SFTPUserStoryTest.php
2015-09-29 21:51:20 -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
26ddf02fee Merge branch 'sftp-endless-loop' into sftp-endless-loop-v2
Conflicts:
	phpseclib/Net/SFTP.php
2015-09-28 09:20:38 -05:00
terrafrost
e2a2ad8c91 SFTP: backport DavidAnderson684's changes to 1.0 branch 2015-09-27 10:56:05 -05:00
Andreas Fischer
ccd18552e5 Merge branch '2.0'
* 2.0:
  Fixed phpdoc

Conflicts:
	phpseclib/Crypt/Hash.php
2015-09-16 13:36:04 +02:00
Graham Campbell
7f1bbfe216 Fixed phpdoc 2015-09-14 16:30:31 +01:00
Graham Campbell
7cd45e5e1b Fixed lots of phpdoc typos 2015-09-02 00:44:55 +01:00
Graham Campbell
2be0506514 Fixed invalid param phpdoc 2015-09-02 00:44:39 +01:00
Graham Campbell
634c1c2a18 Fixed lots of phpdoc typos 2015-09-02 00:42:15 +01:00
Graham Campbell
c08c099c56 Fixed invalid param phpdoc 2015-09-02 00:41:38 +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
terrafrost
2a8da097ae Merge branch 'master' into exceptions-v1
Conflicts:
	phpseclib/Net/SSH2.php
2015-08-31 23:47:12 -05:00
terrafrost
2e46aec03a SFTP: replace user_error's with exceptions 2015-08-31 23:12:33 -05:00
Andreas Fischer
d9e9504fba Merge branch 'PSR2-1.0' into PSR2-2.0
* PSR2-1.0:
  Fix indentation phpcbf did not fix.
  Remove PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket exception.
  Use phpcbf to fix PHP code to ruleset.
  Ignore coding guidelines in ANSI switch block.
  Base code sniffer ruleset on PSR2 rather than PEAR.
  Update PHP Code Sniffer to 2.3.3

Conflicts:
	build/code-sniffer-ruleset-tests.xml
	build/code-sniffer-ruleset.xml
	composer.lock
	phpseclib/Crypt/DES.php
	phpseclib/Crypt/Hash.php
	phpseclib/Crypt/RSA.php
	phpseclib/File/X509.php
	phpseclib/Math/BigInteger.php
	phpseclib/Net/SFTP.php
	phpseclib/Net/SSH1.php
	phpseclib/Net/SSH2.php
	tests/Functional/Net/SFTPUserStoryTest.php
	tests/Unit/Crypt/TwofishTest.php
2015-07-17 13:41:59 +02:00
Andreas Fischer
2013a31ecd Use phpcbf to fix PHP code to ruleset. 2015-07-17 12:57:41 +02:00
Andreas Fischer
4b5cc0c286 Merge branch '1.0' into 2.0
* 1.0:
  SFTP: stat cache updates
2015-07-17 12:45:42 +02:00
terrafrost
862b63e9e5 SFTP: stat cache updates 2015-07-17 12:34:56 +02:00
Andreas Fischer
f782005a3f Merge branch '1.0' into 2.0
* 1.0:
  SFTP: don't update stat cache when it's been disabled
2015-07-06 23:48:28 +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
83cac3385b Merge branch '1.0' into 2.0
* 1.0:
  SFTP: update how recursive delete's update stat cache
  Tests/SFTP: add unit test
2015-07-06 23:38:10 +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
e1dd7e9d69 Merge branch '1.0' into 2.0
* 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
terrafrost
4d82df3fc7 Merge branch 'stat-cache-fix-1.0' into stat-cache-fix-2.0
Conflicts:
	tests/Functional/Net/SFTPUserStoryTest.php
2015-06-20 19:59:48 -05:00
terrafrost
6bc3513914 SFTP: stat cache updates 2015-06-20 19:33:19 -05:00
Andreas Fischer
661f3ce3b9 Merge branch '1.0' into 2.0
* 1.0:
  Replace ; with : in case statement.

Conflicts:
	phpseclib/Net/SFTP.php
	phpseclib/Net/SSH2.php
2015-05-03 14:13:56 +02:00
Andreas Fischer
5d2590feb0 Replace ; with : in case statement. 2015-05-03 13:18:23 +02:00
Andreas Fischer
daaa931dc2 Merge branch '1.0' into 2.0
* 1.0:
  callbacks - two PRs conflict sorted out. First one: e9b698fd65, fba6894474, 1cd286642e Second one: 16430d4d2e, 0cc6125f87
  documentation fix

Conflicts:
	phpseclib/Net/SFTP.php
2015-05-03 01:10:53 +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
36ef1c4084 Merge remote-tracking branch 'audrey/sftp-put-callback' into 2.0 2015-04-16 07:45:39 -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
ca0b56f05c Merge branch '1.0' into 2.0
Conflicts:
	phpseclib/Crypt/Base.php
	phpseclib/Crypt/Blowfish.php
	phpseclib/Crypt/DES.php
	phpseclib/Net/SFTP.php
2015-04-15 23:56:09 -05:00
andrey012
26086789ef replace throw with user_error() 2015-04-15 03:35:08 +03: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
Andrey Grinenko
b5e80bc176 cosmetics 2015-04-11 11:34:41 +03:00
Andrey Grinenko
e58427221d 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-09 02:59:00 +03:00
terrafrost
d75f703c0a rm PHP v4 compatability claim 2015-04-02 05:57:52 -05: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
628949fb73 Namespaced classes 2014-12-15 14:29:20 -08:00
Andreas Fischer
c4b103468c Merge pull request #549 from bantu/fix-547
Change copyright years from roman numeral to decimal numbers.

* bantu/fix-547:
  Change copyright years from roman numeral to decimal numbers.

Conflicts:
	phpseclib/System/SSH_Agent.php
2014-12-10 00:06:08 +01:00
Andreas Fischer
0efae5a91e Change copyright years from roman numeral to decimal numbers. 2014-12-10 00:04:08 +01:00
Clint Nelissen
99b9cc477d Moved global constants to class constants 2014-12-04 13:45:13 -08:00
Andreas Fischer
638e62d60a Remove LICENSE text from source code files. 2014-12-03 18:49:33 +01:00
Andreas Fischer
8af52e2954 Merge branch 'master' into php5
* master:
  SFTP: Use hexdec() and bin2hex() for filesize calculation.
2014-10-19 21:32:23 +02:00
Andreas Fischer
5c3058cc4b SFTP: Use hexdec() and bin2hex() for filesize calculation. 2014-10-19 21:07:12 +02:00
Andreas Fischer
45ce4b24ef Merge branch 'master' into php5
* master:
  SFTP: Replace incorrect comment about filesize. There is no 4 GiB limit.

Conflicts:
	phpseclib/Net/SFTP.php
2014-10-19 20:54:50 +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
Andreas Fischer
e682e20df4 Merge branch 'master' into php5
* master:
  Correct constant: NET_SFTP_BLOCK_DEVICE -> NET_SFTP_TYPE_BLOCK_DEVICE
2014-10-09 23:51:33 +02:00
Andreas Fischer
ce3cf60b10 Correct constant: NET_SFTP_BLOCK_DEVICE -> NET_SFTP_TYPE_BLOCK_DEVICE 2014-10-09 23:24:30 +02:00
Andreas Fischer
645c16d0f5 Merge branch 'master' into php5
* master:
  Fix Net_SFTP::filetype() block device recognition.
2014-10-09 23:19:23 +02:00
Vladimir Volodko
6715c41e1f Fix Net_SFTP::filetype() block device recognition. 2014-10-09 12:46:58 +07:00
Andreas Fischer
a15079676c Merge branch 'master' into php5
* master:
  SFTP: cs adjustment
  SFTP: optimize conditional calls to fclose in get() method
  SFTP: grammar
  SFTP: fix issue with uploading via a resource
  SFTP: make it so files can be downloaded into resources or upload   from resources
2014-08-19 22:25:07 +02: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
bb1c36893f Merge branch 'master' into php5
* master:
  Do not check filename over and over again, remove '.' and '..' from the map instead.
2014-07-24 17:32:38 +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
8862b3c97a Merge branch 'master' into php5
* master:
  Only fclose($fp) when $mode & NET_SFTP_LOCAL_FILE.
2014-07-24 17:04:25 +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
47695777f8 Merge branch 'master' into php5
* master:
  Net_SFTP::_list() only takes two parameters.
2014-07-24 17:02:47 +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
d29ad3afa9 Merge branch 'master' into php5
* master:
  SFTP: stat cache fixes
  SFTP: return $sftp object in new unit test method
  SFTP: add unit test for stat cache fix
2014-07-20 21:41:51 +02:00
terrafrost
a84861bb52 SFTP: stat cache fixes 2014-07-19 21:31:58 -05:00
Andreas Fischer
8e0b9b2d64 Merge branch 'master' into php5
* master:
  SFTP: fix an issue with the stat cache
  README: update download link to latest version
2014-07-12 12:08:36 +02:00
terrafrost
fe7fd97b59 SFTP: fix an issue with the stat cache 2014-07-11 12:14:26 -05:00
Andreas Fischer
510d5e1778 Merge branch 'master' into php5
* master:
  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:56 +02:00
terrafrost
a65b820b54 SFTP: add readlink and symlink functions 2014-06-18 11:34:50 -05:00
Andreas Fischer
67aedc240b Change constructors from class name to __construct().
This has been produced as follows:
<?php
$replace = $files = [];
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($argv[1]));
foreach ($it as $fileinfo) {
    if ($fileinfo->getExtension() === 'php') {
        $file = $fileinfo->getPathname();
        $content = file_get_contents($file);
        $files[$file] = $content;
        $tokens = token_get_all($content);
        foreach ($tokens as $key => $value) {
            if ($value[0] === T_CLASS) {
                $class = $tokens[$key + 2][1];
                $replace += array(
                    "$class::$class(" => "$class::__construct(",
                    "parent::$class(" => "parent::__construct(",
                    "function $class(" => "function __construct(",
                );
            }
        }
    }
}
foreach ($files as $file => $content) {
    file_put_contents(
        $file,
        str_replace(
            array_keys($replace),
            array_values($replace),
            $content
        )
    );
}
2014-06-16 17:06:34 +02:00
Andreas Fischer
f40bc4d3b8 Merge branch 'master' into php5
* master:
  SFTP: update one last comment
  SFTP: update unit test comments
  SFTP: add new line to end of unit test
  SFTP: assertEquals -> assertSame
  SFTP: reset sort options every time and update unit test
  SFTP: rm whitespace
  SFTP: define $sortOptions
  SFTP: add the ability for nlist() and rawlist() to be sorted
2014-06-09 20:19:39 +02: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
f2f5fcd70a Update users of Math_BigInteger. 2014-06-02 20:19:00 +02:00
Andreas Fischer
e6f87318f5 Adjust documentation to coding guidelines: No () around include. 2014-06-01 23:28:49 +02:00
terrafrost
c100264b65 SFTP: NULL -> null 2014-05-26 16:32:57 -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
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
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
terrafrost
466f9354df SFTP: make get() return correctly sized strings 2013-12-27 11:08:33 -06:00
Andreas Fischer
0dd5a9ba9f Merge pull request #228 from bantu/cs-whitespace
CS: Add useful whitespace CodeSniffer rules.

* bantu/cs-whitespace:
  CS: Add useful whitespace CodeSniffer rules.
2013-12-26 11:38:17 +01:00
Andreas Fischer
8bb80b3df0 CS: Add useful whitespace CodeSniffer rules. 2013-12-26 00:33:08 +01:00
terrafrost
172f15f5df SFTP: add explanation for use of 4294967296 2013-12-24 23:44:21 -06:00
terrafrost
0f5b3ea416 Compatibility fixes
- PHP4 doesn't allow method chaining
- $_SESSION isn't always defined
- on PHP5.1 and earlier using 0x100000000 instead of 4294967296 gives E_NOTICE
- array('Net_SSH2', 'func_name') doesn't work so we fix this by passing $this to it.
  to make that work on PHP4 pass by call-time reference. normally this would result
  in a fatal error on PHP5.4+ but doesn't seem to in this case. the following URL
  elaborates:

  http://stackoverflow.com/q/20732563/569976
2013-12-22 18:14:49 -06:00
Andreas Fischer
f0f029b2c1 CS: Fix "PEAR.Commenting.ClassComment.WrongTagOrder" sniff. 2013-12-11 18:33:18 +01:00
Andreas Fischer
3db1fbb072 CS: Fix "PEAR.Commenting.FileComment.TagIndent" sniff. 2013-12-10 20:10:37 +01:00