From a8c22829d8e8845cd4ddf4ef8b61a1ed79edfffc Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Mon, 12 Mar 2018 22:57:42 +0100 Subject: Imported from the SVN repository http://svn.wolffelaar.nl/wsvn/phpbb/branches/jessie/ Signed-off-by: Olivier Gayot --- .../patches/add_phpbb_prefix_to_ldap_escape.patch | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 debian/patches/add_phpbb_prefix_to_ldap_escape.patch (limited to 'debian/patches/add_phpbb_prefix_to_ldap_escape.patch') diff --git a/debian/patches/add_phpbb_prefix_to_ldap_escape.patch b/debian/patches/add_phpbb_prefix_to_ldap_escape.patch new file mode 100644 index 0000000..51abc2d --- /dev/null +++ b/debian/patches/add_phpbb_prefix_to_ldap_escape.patch @@ -0,0 +1,31 @@ +Description: Add phpbb_ prefix to ldap_escape() + Since ldap_escape() has been added to PHP 5.6.0+, it’s internal + declaration throws a fatal error: + Cannot redeclare ldap_escape() at line 300 in /includes/auth/auth_ldap.php +Author: Jakub Senko +Origin: upstream +Bug: https://tracker.phpbb.com/browse/PHPBB3-12468 https://tracker.phpbb.com/browse/PHPBB3-13168 +Bug-Debian: https://bugs.debian.org/778553 +Applied-Upstream: commit, https://github.com/phpbb/phpbb/commit/ba464ec93a2707b602d212e364905a920b3b9460 +Reviewed-by: Andreas Fischer +Last-Update: 2015-02-16 +--- a/includes/auth/auth_ldap.php ++++ b/includes/auth/auth_ldap.php +@@ -282,7 +282,7 @@ + { + global $config; + +- $filter = '(' . $config['ldap_uid'] . '=' . ldap_escape(htmlspecialchars_decode($username)) . ')'; ++ $filter = '(' . $config['ldap_uid'] . '=' . phpbb_ldap_escape(htmlspecialchars_decode($username)) . ')'; + if ($config['ldap_user_filter']) + { + $_filter = ($config['ldap_user_filter'][0] == '(' && substr($config['ldap_user_filter'], -1) == ')') ? $config['ldap_user_filter'] : "({$config['ldap_user_filter']})"; +@@ -294,7 +294,7 @@ + /** + * Escapes an LDAP AttributeValue + */ +-function ldap_escape($string) ++function phpbb_ldap_escape($string) + { + return str_replace(array('*', '\\', '(', ')'), array('\\*', '\\\\', '\\(', '\\)'), $string); + } -- cgit v1.2.3