1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-12-02 17:48:00 +01:00
Commit Graph

34 Commits

Author SHA1 Message Date
terrafrost
5b795c18ab SCP: issue error if remote_file is empty in put() call 2019-01-27 17:03:53 -06:00
terrafrost
48cf16599b suppress unpack() PHP warnings 2016-11-19 22:39:36 -06:00
terrafrost
845135f887 add PHP5-style constructors along side PHP4-style ones 2016-09-10 10:41:05 -07:00
terrafrost
2048a49aac use self:: in phpdoc comments to reduce merge conflicts 2015-10-11 12:22:07 -05: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
2013a31ecd Use phpcbf to fix PHP code to ruleset. 2015-07-17 12:57:41 +02:00
Graham Campbell
e50cbacd4e Fixed some phpdocs 2015-03-29 17:07:17 +01:00
Andreas Fischer
0efae5a91e Change copyright years from roman numeral to decimal numbers. 2014-12-10 00:04:08 +01: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
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
e6f87318f5 Adjust documentation to coding guidelines: No () around include. 2014-06-01 23:28:49 +02: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
Graham Campbell
1c2796e3eb Cleaned up whitespace 2014-01-18 17:29:25 +00:00
terrafrost
4bd9a546ab Merge branch 'master' of https://github.com/phpseclib/phpseclib 2013-12-22 11:53:35 -06:00
terrafrost
1599d2e8d1 SCP: use the new "mode" for _close_channel 2013-12-15 12:07:17 -06:00
terrafrost
c01b8fc4ed SCP: Tweaks
sending the close channel packet right after the eof seems to make some scp transfers terminate prematurely.

unfortunately, sometimes this behavior is undesirable as it is in this case:

http://www.frostjedi.com/phpbb3/viewtopic.php?f=46&t=29457

hence the $want_reply parameter

also, this commit makes the scp packet length account for the length portion
2013-12-15 00:43:20 -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
Andreas Fischer
e09f1b730e CodeSniffer: Fix PEAR.Classes.ClassDeclaration.OpenBraceNewLine sniff. 2013-12-03 19:34:41 +01:00
Marc Philip Scholten
3bfd884813 Removed vim comments
Reformated files
2013-11-23 19:42:26 +01:00
Brian Nesbitt
ccad4b7d08 Added a callable to put for progress updates
This in combination with https://github.com/maximebf/ConsoleKit ProgressBar makes me feel good.
2013-11-01 12:15:28 -04:00
terrafrost
5888c6cef6 SCP: if exec() failed return false immediately 2013-10-21 15:15:31 -05:00
terrafrost
56f1b6f411 SCP: better binary local file support for put() 2013-09-04 02:14:36 -05:00
terrafrost
bafbf1276e SCP: make it so local files can be uploaded 2013-09-02 22:33:50 -05:00
terrafrost
f16a1135c6 SCP: get() doesn't return true on success 2013-09-02 21:18:57 -05:00
Rasmus Lerdorf
e24d7612a2 I think this is what you meant to do here 2013-05-07 23:19:50 -07:00
terrafrost
83ebb08f0a SCP: Update example 2013-04-27 16:06:05 -05:00
terrafrost
4c8173dc23 Add an SCP class 2013-04-27 16:03:35 -05:00