Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[ticket/12239] Move deprecated passwords functions to compatibility file #2087

Merged
merged 1 commit into from

2 participants

@marc1706
Collaborator

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

Ticket: http://tracker.phpbb.com/browse/PHPBB3-12239

@EXreaction

See failing test

@marc1706 marc1706 [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
6251ca1
@marc1706
Collaborator

@EXreaction I'm aware. Should be fixed now.

@EXreaction EXreaction merged commit c40b15a into phpbb:develop
@marc1706 marc1706 deleted the marc1706:ticket/12239 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 6, 2014
  1. @marc1706

    [ticket/12239] Move deprecated passwords functions to compatibility file

    marc1706 authored
    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
This page is out of date. Refresh to see the latest.
View
35 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
View
35 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);
+}
View
2  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
{
Something went wrong with that request. Please try again.