Commit Graph

2851 Commits

Author SHA1 Message Date
terrafrost
13881b09d4 Travis: add PHP 8.1 support
See https://bugs.php.net/75474#1509646645 for more info on the static
change
2021-12-11 10:19:39 -06:00
terrafrost
8a0e6c05e7 Salsa20: fix PHP 5.6 error
The following demonstrates the error:

function demo(&$x)
{
  $x = 5;
}

$x = $y = [10];
demo(...$y);
echo $x[0];

That outputs 5 in PHP 5.6 and 10 in later PHP versions
2021-12-10 07:30:26 -06:00
terrafrost
072a56b2f9 SSH2: allow for stringable objects 2021-12-07 22:20:55 -06:00
terrafrost
20b9abf589 SSH2: show a more helpful error message when logging in with pubkey 2021-12-07 22:10:29 -06:00
terrafrost
6a935bb57b Merge branch '2.0' into 3.0 2021-12-07 21:59:47 -06:00
terrafrost
a74707e080 SSH2: make login() return false if no valid auth methods are found
this is an issue if you, for example, login with a PublicKey instead of a PrivateKey
2021-12-07 21:59:24 -06:00
terrafrost
e9fbf9ed8a Merge branch '1.0' into 2.0 2021-12-07 21:58:21 -06:00
terrafrost
649661cd5e SSH2: make login() return false if no valid auth methods are found 2021-12-07 21:57:55 -06:00
terrafrost
4141799c02 Tests: fix issues with Salsa20 / ChaCha20 unit tests 2021-12-04 18:43:12 -06:00
terrafrost
1bd5b40ee1 SymmetricKey: add getMode() 2021-11-28 11:27:52 -06:00
terrafrost
a85c2f0d6e RSA: rm unused privateKey variable 2021-11-22 08:13:55 -06:00
terrafrost
84295e2fc2 RSA/Keys/Raw: add support for private keys 2021-11-21 21:22:34 -06:00
terrafrost
c4b571a588 EC: error out when scalar is out of range 2021-11-21 09:55:04 -06:00
terrafrost
053910784e CS adjustments 2021-11-14 00:53:03 -06:00
terrafrost
4eb9cbd0c8 EC/Keys/PKCS8: publicKey parameter should be optional 2021-11-14 00:52:37 -06:00
terrafrost
014b3a95a1 Merge branch '2.0' into 3.0 2021-11-11 19:51:26 -06:00
terrafrost
ecd08ffc52 Merge branch '1.0' into 2.0 2021-11-11 19:51:19 -06:00
terrafrost
40035dc59c SFTP: don't attempt to parse unsupported attributes 2021-11-11 19:50:52 -06:00
terrafrost
779e11e496 SSH2: use exceptions rather than user_error 2021-11-11 19:39:49 -06:00
terrafrost
15263f0c9c Merge branch '1.0' into 3.0 2021-11-11 19:38:52 -06:00
terrafrost
cee791820c Merge branch '1.0' into 2.0 2021-11-11 19:17:17 -06:00
terrafrost
fe4dc433cc SSH2: error out when no data is received from the server 2021-11-11 19:06:18 -06:00
terrafrost
0b7db9ebd6 Merge branch '1.0' into 3.0 2021-11-10 19:46:19 -06:00
terrafrost
fcf9dd6175 Merge branch '1.0' into 2.0 2021-11-10 19:45:36 -06:00
terrafrost
31eac61820 Bootstrap: use version_compare instead of PHP_VERSION_ID 2021-11-10 19:45:31 -06:00
yangming
c91671f176 mbstring.func_overload is deprecated in php 6.2 and removed in php 8.0 2021-11-10 19:44:24 -06:00
terrafrost
17e79d9341 Merge branch '2.0' into 3.0 2021-11-08 06:44:55 -06:00
terrafrost
f92a58c83c SFTP: getSupportedVersions() call didn't work 2021-11-08 06:44:36 -06:00
terrafrost
a0405d4816 Merge branch '2.0' into 3.0 2021-11-03 22:28:16 -05:00
terrafrost
9fb26d478a Merge branch '1.0' into 2.0 2021-11-03 22:16:57 -05:00
terrafrost
29c8591cb2 SSH2: add "smart multi factor" login mode (enabled by default) 2021-11-03 22:16:14 -05:00
terrafrost
878526d7c9 SSH2: CS adjustments 2021-10-30 18:16:23 -05:00
terrafrost
13b9663ac6 Merge branch '1.0' into 3.0 2021-10-30 18:15:28 -05:00
terrafrost
895cf85dff Merge branch '0.0' into 2.0 2021-10-30 18:04:25 -05:00
vgogolin
1a942620b3 Backward compatibility with old PHP versions
Fix for PHP Parse error:  syntax error, unexpected '[' in /vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php on line 3558
2021-10-30 18:04:19 -05:00
terrafrost
7a739d75fe Merge branch '2.0' into 3.0 2021-10-26 20:48:46 -05:00
terrafrost
2de84fba24 Merge branch '1.0' into 2.0 2021-10-26 20:14:31 -05:00
terrafrost
da6c1b06bf SSH2: add support for zlib and zlib@openssh.com compression 2021-10-26 20:04:53 -05:00
Christopher Davis
24150b26f6 Don't Use Array Unpackage for Status Code -> Error
the `status_codes` property is an array with integer keys and string
values, but the `$error` value in `SFTP::logError` was trying to be unpacked
from an array.

Seems to come from cee3f3cd4a, but even at
that commit the `status_codes` data structure was still an array.

This bug is only present in 3.X, 2.X release didn't unpack here:
a684f12065/phpseclib/Net/SFTP.php (L829)
2021-10-13 19:58:27 -05:00
terrafrost
a2c30f9d33 Merge branch '2.0' into 3.0 2021-10-11 09:15:37 -05:00
terrafrost
eacb9f8614 Merge branch '1.0' into 2.0 2021-10-11 09:02:22 -05:00
terrafrost
74f1c9ed7b SSH2: CS adjustments 2021-10-11 08:58:43 -05:00
terrafrost
9a61525f44 SSH2: rm unnecessary code 2021-10-11 08:53:21 -05:00
terrafrost
0fe328936c SSH2: implement a different fix for #1613 2021-10-11 08:47:51 -05:00
terrafrost
2564032e6f Merge branch '2.0' into 3.0 2021-10-09 13:32:07 -05:00
terrafrost
2f3ca7123d SSH2: fix channel constant 2021-10-09 13:31:14 -05:00
terrafrost
b3e39538b8 Merge branch '2.0' into 3.0 2021-10-09 13:27:40 -05:00
terrafrost
7b2097c6bd Merge branch '1.0' into 2.0 2021-10-09 13:24:22 -05:00
terrafrost
1fab947f01 SSH2: fixes for noisy channels 2021-10-09 13:21:09 -05:00
terrafrost
644af71b6c SSH2: readd public for 3.0 branch 2021-10-09 13:00:30 -05:00
terrafrost
025b8beb8f Merge branch '2.0' into 3.0 2021-10-09 13:00:03 -05:00
terrafrost
fe6e2b9bfe Merge branch '1.0' into 2.0 2021-10-09 12:59:56 -05:00
terrafrost
b29f134c24 SSH2: CS adjustments 2021-10-09 12:59:48 -05:00
terrafrost
f25f8c0db8 Merge branch '1.0' into 2.0 2021-10-09 08:26:29 -05:00
terrafrost
8d4831ad1f SFTP: CS adjustments 2021-10-09 08:26:11 -05:00
terrafrost
cd80f98788 Merge branch '2.0' into 3.0 2021-10-09 07:51:17 -05:00
terrafrost
7c14eedbfd Merge branch '1.0' into 2.0 2021-10-09 07:50:36 -05:00
terrafrost
e4d2416bdc SSH2: SSH-2.0-CoreFTP is 15 bytes long - not 13 2021-10-09 07:50:10 -05:00
terrafrost
d8ea63dbdb
Merge pull request #1697 from terrafrost/sftpv456-3.0
add SFTP v4/5/6 support to phpseclib v3
2021-09-28 20:39:40 -05:00
terrafrost
1c8718f3dd
Merge pull request #1696 from terrafrost/sftpv456-2.0
add SFTP v4/5/6 support to phpseclib v2
2021-09-28 20:39:29 -05:00
terrafrost
a09eb04296
Merge pull request #1695 from terrafrost/sftpv456
add SFTP v4/5/6 support to phpseclib v1
2021-09-28 20:39:18 -05:00
terrafrost
13b5ad9593 Merge branch '1.0' into 3.0 2021-09-28 09:00:00 -05:00
terrafrost
addfd93b71 Merge branch '1.0' into 2.0 2021-09-28 08:59:13 -05:00
terrafrost
3ef68bd912 RSA: ssh-keygen -yf private.key fails if \r is present 2021-09-28 08:57:41 -05:00
terrafrost
defd5d23b1 fix bad merge 2021-09-18 10:35:21 -05:00
terrafrost
0dbbeb39ce Merge branch 'sftpv455-2.0' into sftpv456-3.0 2021-09-16 16:24:11 -05:00
terrafrost
367fede9c0 rm double _precheck from rename() 2021-09-15 20:23:31 -05:00
terrafrost
658cacce9f Merge branch 'sftpv456' into sftpv456-2.0 2021-09-15 20:22:35 -05:00
terrafrost
f6ae13a092 fixes for setting atime and mtime 2021-09-15 08:33:31 -05:00
terrafrost
d48bdde5c6 update comment 2021-09-14 20:34:30 -05:00
terrafrost
a64103a386 attr wasn't defined 2021-09-14 20:33:11 -05:00
terrafrost
4769de45f0 comment is no longer valid 2021-09-14 09:11:53 -05:00
terrafrost
bb17b35d3e preferentially use SFTPv3, since that's waaaay more tested than any other version 2021-09-14 09:05:41 -05:00
terrafrost
9ae2b0030d SFTP: update get(), put() and touch() 2021-09-13 09:08:48 -05:00
terrafrost
5fcba4627f update rename 2021-09-11 21:24:43 -05:00
terrafrost
6303fbac9e fix OpenSSH detection 2021-09-09 05:39:20 -05:00
terrafrost
ced7dab1d5 update symlink 2021-09-08 09:34:16 -05:00
terrafrost
41b5f7cfe9 tweak version management stuff 2021-08-29 13:11:26 -05:00
terrafrost
42b4ab065b typo 2021-08-29 13:04:32 -05:00
terrafrost
4102bbaccc add precheck in a few more places 2021-08-29 13:02:09 -05:00
terrafrost
19e7737ead fix _precheck 2021-08-29 13:00:21 -05:00
terrafrost
c9e4944370 pwd didn't work if called first 2021-08-27 21:57:38 -05:00
terrafrost
a25d3a75d3 fix pre-php-5.4 syntax error 2021-08-27 12:40:38 -05:00
terrafrost
69dba39bc9 update chown / chgrp if stmt 2021-08-26 20:18:27 -05:00
terrafrost
dbfc762257 update chown and chgrp to wor with sftpv4+ 2021-08-26 18:26:57 -05:00
terrafrost
1f1e2794c7 add attribute reading for sftpv6 2021-08-26 09:23:33 -05:00
terrafrost
1b90375231 Merge branch '2.0' into 3.0 2021-08-24 20:24:50 -05:00
terrafrost
f02f0005b4 Merge branch '1.0' into 2.0 2021-08-24 20:22:54 -05:00
terrafrost
fc40727cfb SFTP: add disableArbitraryLengthPackets() 2021-08-24 20:22:29 -05:00
terrafrost
9db03e1536 Merge branch '2.0' into 3.0 2021-08-24 20:20:20 -05:00
terrafrost
ea4b75f165 Merge branch '0.0' into 2.0 2021-08-24 20:19:18 -05:00
Nick Lassonde
20500123e5 add option to allow arbitrary length packets, for servers like OpenText which sends extremely long directory listings 2021-08-24 20:18:52 -05:00
terrafrost
e5e21c114f BigInteger: code cleanup
generateCustomReduction() is called by slidingWindow() and
createRecurringModuloFunction(). i suspect this code was an early
attempt to implement what'd later become createRecurringModuloFunction()
2021-08-14 18:15:14 -05:00
Claude Pache
291eec0ce5 PublicKeyLoader: make all methods static 2021-08-14 12:03:43 -05:00
terrafrost
12864bd9f6 AsymmetricKey: make more methods static 2021-08-14 12:03:23 -05:00
terrafrost
f56158e73f add attribute reading for sftpv5 2021-08-01 23:16:31 -05:00
terrafrost
092bad12c5 add attribute reading for sftpv4 2021-07-31 15:38:21 -05:00
terrafrost
4cb6bcb75e add setPreferredVersion() and other changes 2021-07-31 13:00:52 -05:00
terrafrost
a19c6ab7e6 Merge branch '1.0' into 3.0 2021-07-28 21:00:24 -05:00
terrafrost
c08afba575 Merge branch '1.0' into 2.0 2021-07-28 20:34:13 -05:00
terrafrost
0ec9d2bdf1 SFTP: CS adjustments 2021-07-28 20:33:52 -05:00
terrafrost
b0fe99b792 Merge branch '1.0' into 2.0 2021-07-28 20:01:26 -05:00
Nick Lassonde
dab514faff timeout in _get_channel_packet during _init_sftp_connection should be a failure 2021-07-28 20:01:19 -05:00
terrafrost
5e290492d1 Serializable is being deprecated in PHP 8.1 2021-07-22 09:19:15 -05:00
terrafrost
05539a72be PrimeField: plug memory leaks 2021-07-10 13:24:33 -05:00
terrafrost
8186db7533 SFTP: get_channel_packet throws exceptions in 3.0 2021-07-05 08:35:39 -05:00
terrafrost
926d3545a2 Merge branch '2.0' into 3.0 2021-07-05 08:34:36 -05:00
terrafrost
6b0f0b4896 Merge branch '1.0' into 2.0 2021-07-05 08:34:18 -05:00
terrafrost
a02526e5e0 SFTP: return false if get_channel_packet returns false 2021-07-05 08:33:42 -05:00
terrafrost
bf88ba4382 incremental commit 2021-06-25 11:29:03 -05:00
terrafrost
927f8062a7 Merge branch '2.0' into 3.0 2021-06-24 21:45:57 -05:00
terrafrost
5a3e622c4d Merge branch '1.0' into 2.0 2021-06-24 21:38:25 -05:00
terrafrost
973bb072a0 ASN1: return false when not enough bytes are available 2021-06-24 21:36:03 -05:00
terrafrost
f0736a8828 X509: getPublicKey() didn't return correct RSA key type 2021-06-23 22:00:36 -05:00
terrafrost
fceb5b47da SFTP: CS adjustments 2021-06-19 11:30:03 -05:00
terrafrost
418035c404 SSH2: use weakreference when available to stop memory leak 2021-06-19 11:17:23 -05:00
ahoareau
f1c4164687 fix exception thrown because of undefined constant with php7.4 2021-06-16 08:43:35 -05:00
terrafrost
9b1f8a260a SSH2: NET_SSH2_CHANNEL_KEEP_ALIVE -> self::CHANNEL_KEEP_ALIVE 2021-06-16 08:12:09 -05:00
terrafrost
a5fcb44e28 AsymmetricKey: make methods static 2021-06-16 01:40:27 -05:00
terrafrost
b32ffb64b8 Merge branch '2.0' into 3.0 2021-06-15 07:29:03 -05:00
terrafrost
d48c13b716 Merge branch '1.0' into 2.0 2021-06-15 07:27:34 -05:00
terrafrost
0673370eda SFTP: don't check SFTP packet size after SFTP initialization 2021-06-15 07:24:34 -05:00
terrafrost
07423805ac Merge branch '2.0' into 3.0 2021-06-12 07:58:20 -05:00
terrafrost
451ddf453c Merge branch '1.0' into 2.0 2021-06-12 07:11:44 -05:00
terrafrost
c3560c2d4d RSA: OAEP decryption didn't check labels correctly 2021-06-12 07:06:08 -05:00
terrafrost
d1666cac50 SFTP: CS adjustments 2021-06-02 22:59:11 -05:00
terrafrost
d7c96ebfb2 ASN1: change how default values are processed for ints and enums 2021-06-01 20:00:40 -05:00
terrafrost
d0a18020f3 Merge branch '2.0' into 3.0 2021-05-23 10:39:25 -05:00
terrafrost
333d2f9ffd Merge branch '1.0' into 2.0 2021-05-23 10:38:31 -05:00
terrafrost
0a2dc24489 X509: extra characters before cert weren't being removed 2021-05-23 10:38:11 -05:00
terrafrost
cfe8a24011 PrivateKey: tweak interface 2021-05-22 10:18:11 -05:00
terrafrost
84f07cc9cb X509: signing with pw protected PSS keys yielded errors 2021-05-22 10:10:09 -05:00
terrafrost
c98b163e76 SSH2: rm unneeded false checks (for which exceptions are now used) 2021-05-21 16:36:53 -05:00
terrafrost
4b2bdfa408 Merge branch '2.0' into 3.0 2021-05-18 22:02:48 -05:00
terrafrost
fe6a84a58b Merge branch '1.0' into 2.0 2021-05-18 22:02:39 -05:00
terrafrost
915d1d8ca9 SSH2: fix PHP7.4 errors about accessing bool as string 2021-05-18 22:00:59 -05:00
terrafrost
c1c233e907 Merge branch '2.0' into 3.0 2021-05-15 22:28:36 -05:00
terrafrost
94abf563ad Merge branch '1.0' into 2.0 2021-05-15 22:22:35 -05:00
terrafrost
8204273978 SSH2: fix issue with key re-exchange 2021-05-15 22:22:14 -05:00
terrafrost
574382e06a Merge branch '2.0' into 3.0 2021-05-14 12:56:16 -05:00
terrafrost
0b4484a107 Merge branch '1.0' into 2.0 2021-05-14 12:56:09 -05:00
terrafrost
9a7cfafc8d SSH2: timeout would occasionally infinitely loop
this was changed from !$this->curTimeout to $this->curTimeout <= 0
in commit 96c4c3bc58
2021-05-14 12:55:06 -05:00
terrafrost
81ffb62c20 Merge branch '2.0' into 3.0-channel-closure 2021-05-11 20:28:46 -05:00
terrafrost
1e36329433 Merge branch '1.0' into 2.0 2021-05-11 20:23:49 -05:00
terrafrost
9c47b0a696 SFTP: reopen channel on channel closure 2021-05-11 20:20:46 -05:00
terrafrost
b2267e24b0 Merge branch '1.0' into 2.0 2021-05-09 07:54:40 -05:00
danieljankowski
b07738814e ASN1: fix timezone issue when non-utc time is given 2021-05-09 07:08:20 -05:00
terrafrost
05828a8759 SFTP: reopen channel on channel closure 2021-05-09 01:07:09 -05:00
nickyb
b53f54d953 Implemented auth_methods_to_continue property and getter. 2021-05-02 08:44:02 -05:00
terrafrost
f1c7946b72 Merge branch '1.0' into 2.0 2021-05-02 08:37:28 -05:00