From 246e9e154f3fc4f1b95c2cfb48710761d4423d4e Mon Sep 17 00:00:00 2001 From: terrafrost Date: Tue, 10 Jun 2014 23:08:56 -0500 Subject: [PATCH] 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 --- phpseclib/Net/SSH2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 6dd29ed1..49382177 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1140,7 +1140,7 @@ class Net_SSH2 $encryption_algorithms = array_values($encryption_algorithms); } - static $mac_algorithms = array( + $mac_algorithms = array( 'hmac-sha1-96', // RECOMMENDED first 96 bits of HMAC-SHA1 (digest length = 12, key length = 20) 'hmac-sha1', // REQUIRED HMAC-SHA1 (digest length = key length = 20) 'hmac-md5-96', // OPTIONAL first 96 bits of HMAC-MD5 (digest length = 12, key length = 16)