aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-03-05 20:00:55 +0100
committerMarc Alexander <admin@m-a-styles.de>2014-03-06 09:43:52 +0100
commit6251ca145978eddc017851c23b2558404692691b (patch)
treefe62c0cbb20cb3f688f7c8b1e432352bf5909d91
parent71354ef185e003319cdc9031928054fdb2f0b970 (diff)
downloadforums-6251ca145978eddc017851c23b2558404692691b.tar
forums-6251ca145978eddc017851c23b2558404692691b.tar.gz
forums-6251ca145978eddc017851c23b2558404692691b.tar.bz2
forums-6251ca145978eddc017851c23b2558404692691b.tar.xz
forums-6251ca145978eddc017851c23b2558404692691b.zip
[ticket/12239] Move deprecated passwords functions to compatibility file
The deprecated passwords functions are no longer used in the core and have been replaced with the passwords manager. Therefore, the functions are moved to the functions_compatibility file. PHPBB3-12239
-rw-r--r--phpBB/includes/functions.php35
-rw-r--r--phpBB/includes/functions_compatibility.php35
-rw-r--r--tests/security/hash_test.php2
3 files changed, 36 insertions, 36 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 689a682de3..aca1443cce 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -368,41 +368,6 @@ function still_on_time($extra_time = 15)
}
/**
-* Hash the password
-*
-* @deprecated 3.1.0-a2 (To be removed: 3.3.0)
-*
-* @param string $password Password to be hashed
-*
-* @return string|bool Password hash or false if something went wrong during hashing
-*/
-function phpbb_hash($password)
-{
- global $phpbb_container;
-
- $passwords_manager = $phpbb_container->get('passwords.manager');
- return $passwords_manager->hash($password);
-}
-
-/**
-* Check for correct password
-*
-* @deprecated 3.1.0-a2 (To be removed: 3.3.0)
-*
-* @param string $password The password in plain text
-* @param string $hash The stored password hash
-*
-* @return bool Returns true if the password is correct, false if not.
-*/
-function phpbb_check_hash($password, $hash)
-{
- global $phpbb_container;
-
- $passwords_manager = $phpbb_container->get('passwords.manager');
- return $passwords_manager->check($password, $hash);
-}
-
-/**
* Hashes an email address to a big integer
*
* @param string $email Email address
diff --git a/phpBB/includes/functions_compatibility.php b/phpBB/includes/functions_compatibility.php
index 2197815087..62c2ba6905 100644
--- a/phpBB/includes/functions_compatibility.php
+++ b/phpBB/includes/functions_compatibility.php
@@ -48,3 +48,38 @@ function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $
return phpbb_get_avatar($row, $alt, $ignore_config);
}
+
+/**
+* Hash the password
+*
+* @deprecated 3.1.0-a2 (To be removed: 3.3.0)
+*
+* @param string $password Password to be hashed
+*
+* @return string|bool Password hash or false if something went wrong during hashing
+*/
+function phpbb_hash($password)
+{
+ global $phpbb_container;
+
+ $passwords_manager = $phpbb_container->get('passwords.manager');
+ return $passwords_manager->hash($password);
+}
+
+/**
+* Check for correct password
+*
+* @deprecated 3.1.0-a2 (To be removed: 3.3.0)
+*
+* @param string $password The password in plain text
+* @param string $hash The stored password hash
+*
+* @return bool Returns true if the password is correct, false if not.
+*/
+function phpbb_check_hash($password, $hash)
+{
+ global $phpbb_container;
+
+ $passwords_manager = $phpbb_container->get('passwords.manager');
+ return $passwords_manager->check($password, $hash);
+}
diff --git a/tests/security/hash_test.php b/tests/security/hash_test.php
index bc1bebd87a..32aa234316 100644
--- a/tests/security/hash_test.php
+++ b/tests/security/hash_test.php
@@ -7,7 +7,7 @@
*
*/
-require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_compatibility.php';
class phpbb_security_hash_test extends phpbb_test_case
{