1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-27 12:44:38 +01:00
Commit Graph

45 Commits

Author SHA1 Message Date
Graham Campbell
7f1bbfe216 Fixed phpdoc 2015-09-14 16:30:31 +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
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
terrafrost
d00e20a140 Merge remote-tracking branch 'graham/1.0-phpdoc' into 2.0-phpdoc
Conflicts:
	phpseclib/Crypt/Base.php
	phpseclib/Net/SCP.php
	tests/Unit/File/ASN1Test.php
2015-04-16 00:42:53 -05:00
terrafrost
d75f703c0a rm PHP v4 compatability claim 2015-04-02 05:57:52 -05:00
Graham Campbell
e50cbacd4e Fixed some phpdocs 2015-03-29 17:07:17 +01:00
Clint Nelissen
f3565346fa Replaced get_class() calls with instanceof operators 2014-12-24 13:07:14 -08: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
a3f52dcf61 Merge branch 'master' into php5
* master:
  Quote shell argument with escapeshellarg()
2014-12-04 20:00:45 +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
243ad0c54a Merge branch 'master' into php5
* master:
  SCP: Add missing space after case statement.
2014-12-04 19:56:34 +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
Andreas Fischer
b771ca36cf Merge pull request #519 from bantu/remove-license-text
Remove LICENSE text from source code files.

* bantu/remove-license-text:
  Remove LICENSE text from source code files.
2014-12-03 23:13:00 +01:00
Andreas Fischer
632c47e55f Merge branch 'master' into php5
* master:
  Avoid calling fclose(false)
2014-12-03 23:08:56 +01: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
Andreas Fischer
638e62d60a Remove LICENSE text from source code files. 2014-12-03 18:49:33 +01:00
Andreas Fischer
d198756a76 Merge branch 'master' into php5
* master:
  SCP: always encapsulate filenames within double quotes
  SCP: add support for file names with spaces
2014-07-05 17:40:07 +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
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
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