diff options
Diffstat (limited to 'debian/patches/add_phpbb_prefix_to_ldap_escape.patch')
-rw-r--r-- | debian/patches/add_phpbb_prefix_to_ldap_escape.patch | 31 |
1 files changed, 31 insertions, 0 deletions
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 <jakubsenko@gmail.com> +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 <bantu@phpbb.com> +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); + } |