summaryrefslogtreecommitdiff
path: root/databases/phpldapadmin/patches/patch-lib_functions.php
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2013-04-02 16:00:10 +0000
committertaca <taca@pkgsrc.org>2013-04-02 16:00:10 +0000
commit537cf4656a95b6477331116fa8b19812f7cd3134 (patch)
tree3c82b4fe46d6c9c6b5e1fddb6bff91591d322db1 /databases/phpldapadmin/patches/patch-lib_functions.php
parenta44e9b58e063fcf367b728f6fa3dc668083298ce (diff)
downloadpkgsrc-537cf4656a95b6477331116fa8b19812f7cd3134.tar.gz
Update phpldapadmin to 1.2.3.
* There was a mistake in patches/patch-lib_functions.php, droping "ssha" password type. 2012-10-01 Release 1.2.3 master RELEASE-1.2.3 2012-10-01 Update template to show multiselect values 2012-09-06 Language update from launchpad for 1.2.3 (also see #30) 2012-09-05 SF Bug #3531956 - Search / Show Attributes must be lowercase 2012-09-05 SF Bug #3518548 - Missing attributes on some custom forms 2012-09-05 SF Bug #3513210 - Export to VCARD only exports the last entry in the list 2012-09-05 SF Bug #3510648 - Cannot copy between servers 2012-09-05 SF Bug #3510114 - Unable to check passwords when samba hashes are in lowercase 2012-09-05 SF Bug #3452416 - templates <order> non-functional 2012-09-05 SF Bug #3427748 - value id is ignored in select attribute 2012-09-04 SF Bug #3448530 - Treat krbExtraData and krbPrincipalKe as binary 2012-09-02 SF Bug #3497660 - XSS flaws via 'export', 'add_value_form' and 'dn' variables 2012-09-02 SF Bug #3426575 - clicking 'logout' does not unset _SESSION['ACTIVITY'] 2012-09-01 SF Feature #3555472 - User-friendly items in entry chooser window. 2012-09-01 SF Feature #3509651 - Add support for SHA512 with OpenLDAP 2012-08-29 SF Patch #3469148 - Display mass edit actions as buttons 2012-01-24 SF Bug #3477910 - XSS vulnerability in query
Diffstat (limited to 'databases/phpldapadmin/patches/patch-lib_functions.php')
-rw-r--r--databases/phpldapadmin/patches/patch-lib_functions.php82
1 files changed, 0 insertions, 82 deletions
diff --git a/databases/phpldapadmin/patches/patch-lib_functions.php b/databases/phpldapadmin/patches/patch-lib_functions.php
deleted file mode 100644
index 2ff1585f06c..00000000000
--- a/databases/phpldapadmin/patches/patch-lib_functions.php
+++ /dev/null
@@ -1,82 +0,0 @@
-$NetBSD: patch-lib_functions.php,v 1.1 2013/01/21 12:43:23 taca Exp $
-
-* Add support for SHA512 with OpenLDAP from repository,
- 21959715c3d6f204dd6c35b2e313eb2d4a01d22a.
-
---- lib/functions.php.orig 2011-10-27 02:07:09.000000000 +0000
-+++ lib/functions.php
-@@ -1471,10 +1471,10 @@ function get_next_number($base,$attr,$in
- for ($i=0;$i<count($autonum);$i++) {
- $num = $autonum[$i] < $minNumber ? $minNumber : $autonum[$i];
-
-- /* If we're at the end of the list, or we've found a gap between this number and the
-- following, use the next available number in the gap. */
-- if ($i+1 == count($autonum) || $autonum[$i+1] > $num+1)
-- return $autonum[$i] >= $num ? $num+1 : $num;
-+ /* If we're at the end of the list, or we've found a gap between this number and the
-+ following, use the next available number in the gap. */
-+ if ($i+1 == count($autonum) || $autonum[$i+1] > $num+1)
-+ return $autonum[$i] >= $num ? $num+1 : $num;
- }
-
- # If we didnt find a suitable gap and are all above the minNumber, we'll just return the $minNumber
-@@ -2114,7 +2114,7 @@ function password_types() {
- 'md5crypt'=>'md5crypt',
- 'sha'=>'sha',
- 'smd5'=>'smd5',
-- 'ssha'=>'ssha'
-+ 'ssh512'=>'ssh512'
- );
- }
-
-@@ -2123,7 +2123,7 @@ function password_types() {
- *
- * @param string The password to hash in clear text.
- * @param string Standard LDAP encryption type which must be one of
-- * crypt, ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, or clear.
-+ * crypt, ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, sha512, or clear.
- * @return string The hashed password.
- */
- function password_hash($password_clear,$enc_type) {
-@@ -2216,6 +2216,16 @@ function password_hash($password_clear,$
-
- break;
-
-+ case 'sha512':
-+ if (function_exists('openssl_digest') && function_exists('base64_encode')) {
-+ $new_value = sprintf('{SHA512}%s', base64_encode(openssl_digest($password_clear, 'sha512', true)));
-+
-+ } else {
-+ error(_('Your PHP install doest not have the openssl_digest() or base64_encode() function. Cannot do SHA512 hashes. '),'error','index.php');
-+ }
-+
-+ break;
-+
- case 'clear':
- default:
- $new_value = $password_clear;
-@@ -2379,6 +2389,15 @@ function password_check($cryptedpassword
-
- break;
-
-+ # SHA512 crypted passwords
-+ case 'sha512':
-+ if (strcasecmp(password_hash($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0)
-+ return true;
-+ else
-+ return false;
-+
-+ break;
-+
- # No crypt is given assume plaintext passwords are used
- default:
- if ($plainpassword == $cryptedpassword)
-@@ -2782,7 +2801,7 @@ function draw_formatted_dn($server,$entr
-
- $formats = $_SESSION[APPCONFIG]->getValue('appearance','tree_display_format');
-
-- foreach ($formats as $format) {
-+ foreach ($formats as $format) {
- $has_none = false;
- preg_match_all('/%[a-zA-Z_0-9]+/',$format,$tokens);
- $tokens = $tokens[0];