[BUGFIX] Remove unused if in PasswordHashing 06/59206/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 19 Dec 2018 09:44:23 +0000 (10:44 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Wed, 19 Dec 2018 10:11:36 +0000 (11:11 +0100)
A useless if can be dropped since the deprecation
removals.

Resolves: #87208
Releases: master
Change-Id: Ib664a3d50fb4aeb7956606b054e46a0be84d1e92
Reviewed-on: https://review.typo3.org/59206
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Classes/Crypto/PasswordHashing/BlowfishPasswordHash.php
typo3/sysext/core/Classes/Crypto/PasswordHashing/Md5PasswordHash.php
typo3/sysext/core/Classes/Crypto/PasswordHashing/PhpassPasswordHash.php

index 5cd3c08..0f04c78 100644 (file)
@@ -97,9 +97,7 @@ class BlowfishPasswordHash implements PasswordHashInterface
     {
         $saltedPW = null;
         if (!empty($password)) {
-            if (empty($salt) || !$this->isValidSalt($salt)) {
-                $salt = $this->getGeneratedSalt();
-            }
+            $salt = $this->getGeneratedSalt();
             $saltedPW = crypt($password, $this->applySettingsToSalt($salt));
         }
         return $saltedPW;
index 0d94b90..9c64e9b 100644 (file)
@@ -69,9 +69,7 @@ class Md5PasswordHash implements PasswordHashInterface
     {
         $saltedPW = null;
         if (!empty($password)) {
-            if (empty($salt) || !$this->isValidSalt($salt)) {
-                $salt = $this->getGeneratedSalt();
-            }
+            $salt = $this->getGeneratedSalt();
             $saltedPW = crypt($password, $this->applySettingsToSalt($salt));
         }
         return $saltedPW;
index 36016d0..e8205c6 100644 (file)
@@ -97,9 +97,7 @@ class PhpassPasswordHash implements PasswordHashInterface
     {
         $saltedPW = null;
         if (!empty($password)) {
-            if (empty($salt) || !$this->isValidSalt($salt)) {
-                $salt = $this->getGeneratedSalt();
-            }
+            $salt = $this->getGeneratedSalt();
             $saltedPW = $this->cryptPassword($password, $this->applySettingsToSalt($salt));
         }
         return $saltedPW;