summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2014-11-30 21:12:03 -0800
committerStanislav Malyshev <stas@php.net>2014-11-30 21:37:39 -0800
commit84be568366e50f76818abfbd49ca623ead809606 (patch)
treec9348bcf67e9ae66308bd24974c2491e493cb139
parent301b7f990af5011a5b468b4fb5a6178b8d5ca66e (diff)
downloadphp-git-84be568366e50f76818abfbd49ca623ead809606.tar.gz
update news
-rw-r--r--NEWS3
-rw-r--r--ext/standard/crypt.c10
2 files changed, 8 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index f1bef3cdfa..16e1ebeecf 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 f884397742..e5b5c329ec 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 {