From 84be568366e50f76818abfbd49ca623ead809606 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 30 Nov 2014 21:12:03 -0800 Subject: [PATCH] update news --- NEWS | 3 +++ ext/standard/crypt.c | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index f1bef3cdfa2..16e1ebeecf0 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 20?? PHP 5.4.36 +- Core: + . Upgraded crypt_blowfish to version 1.3. (Leigh) + 13 Nov 2014 PHP 5.4.35 - Core: diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index f884397742c..e5b5c329ecb 100644 --- a/ext/standard/crypt.c +++ b/ext/standard/crypt.c @@ -204,7 +204,7 @@ PHP_FUNCTION(crypt) salt[salt_in_len] = '\0'; crypt_res = php_sha512_crypt_r(str, salt, output, needed); - if (!crypt_res) { + if (!crypt_res || (salt[0]=='*' && salt[1]=='0')) { if (salt[0]=='*' && salt[1]=='0') { RETVAL_STRING("*1", 1); } else { @@ -227,7 +227,7 @@ PHP_FUNCTION(crypt) salt[salt_in_len] = '\0'; crypt_res = php_sha256_crypt_r(str, salt, output, needed); - if (!crypt_res) { + if (!crypt_res || (salt[0]=='*' && salt[1]=='0')) { if (salt[0]=='*' && salt[1]=='0') { RETVAL_STRING("*1", 1); } else { @@ -251,7 +251,7 @@ PHP_FUNCTION(crypt) memset(output, 0, PHP_MAX_SALT_LEN + 1); crypt_res = php_crypt_blowfish_rn(str, salt, output, sizeof(output)); - if (!crypt_res) { + if (!crypt_res || (salt[0]=='*' && salt[1]=='0')) { if (salt[0]=='*' && salt[1]=='0') { RETVAL_STRING("*1", 1); } else { @@ -267,7 +267,7 @@ PHP_FUNCTION(crypt) _crypt_extended_init_r(); crypt_res = _crypt_extended_r(str, salt, &buffer); - if (!crypt_res) { + if (!crypt_res || (salt[0]=='*' && salt[1]=='0')) { if (salt[0]=='*' && salt[1]=='0') { RETURN_STRING("*1", 1); } else { @@ -291,7 +291,7 @@ PHP_FUNCTION(crypt) # error Data struct used by crypt_r() is unknown. Please report. # endif crypt_res = crypt_r(str, salt, &buffer); - if (!crypt_res) { + if (!crypt_res || (salt[0]=='*' && salt[1]=='0')) { if (salt[0]=='*' && salt[1]=='0') { RETURN_STRING("*1", 1); } else {