]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6'
authorStanislav Malyshev <stas@php.net>
Mon, 1 Dec 2014 05:41:04 +0000 (21:41 -0800)
committerStanislav Malyshev <stas@php.net>
Mon, 1 Dec 2014 05:47:40 +0000 (21:47 -0800)
* PHP-5.6:
  update news
  update news
  update NEWS
  Apply error-code-salt fix to Windows too
  Bug fixes in light of failing bcrypt tests
  Add tests from 1.3. Add missing tests.
  Upgrade crypt_blowfish to version 1.3
  Apply error-code-salt fix to Windows too
  Bug fixes in light of failing bcrypt tests
  Add tests from 1.3. Add missing tests.
  Upgrade crypt_blowfish to version 1.3

Conflicts:
ext/standard/crypt.c

1  2 
ext/standard/crypt.c

index 7fae04fcbf40d56836ecf4d3de4f5a3e631f5171,687befbae12e5d4c9d443951c622a23d87ea2fb3..efc424873224786b0171cdd351a13194f4222a15
@@@ -219,11 -218,11 +218,11 @@@ PHPAPI zend_string *php_crypt(const cha
                        _crypt_extended_init_r();
  
                        crypt_res = _crypt_extended_r(password, salt, &buffer);
-                       if (!crypt_res) {
+                       if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) {
 -                              return FAILURE;
 +                              return NULL;
                        } else {
 -                              *result = estrdup(crypt_res);
 -                              return SUCCESS;
 +                              result = zend_string_init(crypt_res, strlen(crypt_res), 0);
 +                              return result;
                        }
                }
        }
  #    error Data struct used by crypt_r() is unknown. Please report.
  #  endif
                crypt_res = crypt_r(password, salt, &buffer);
-               if (!crypt_res) {
-                       return FAILURE;
+               if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) {
 -                      return FAILURE;
++                      return NULL;
                } else {
 -                      *result = estrdup(crypt_res);
 -                      return SUCCESS;
 +                      result = zend_string_init(crypt_res, strlen(crypt_res), 0);
 +                      return result;
                }
        }
  # endif