Projet

Général

Profil

Révision 97383e36

Ajouté par Assos Assos il y a plus de 9 ans

Udpate to 7.34

Voir les différences:

drupal7/includes/password.inc
140 140
 * @param $algo
141 141
 *   The string name of a hashing algorithm usable by hash(), like 'sha256'.
142 142
 * @param $password
143
 *   The plain-text password to hash.
143
 *   Plain-text password up to 512 bytes (128 to 512 UTF-8 characters) to hash.
144 144
 * @param $setting
145 145
 *   An existing hash or the output of _password_generate_salt().  Must be
146 146
 *   at least 12 characters (the settings and salt).
......
150 150
 *   The return string will be truncated at DRUPAL_HASH_LENGTH characters max.
151 151
 */
152 152
function _password_crypt($algo, $password, $setting) {
153
  // Prevent DoS attacks by refusing to hash large passwords.
154
  if (strlen($password) > 512) {
155
    return FALSE;
156
  }
153 157
  // The first 12 characters of an existing hash are its setting string.
154 158
  $setting = substr($setting, 0, 12);
155 159

  

Formats disponibles : Unified diff