[debian-edu-commits] debian-edu/pkg-team/ 01/01: debian/patches: Add 1024_dont-overescape-dollar-signs-in-smb-passwords.patch. Don't over-escape "$" characters in passwords provided to the sambaHashHook execution call.
Mike Gabriel
sunweaver at debian.org
Sun Jan 31 12:40:21 UTC 2016
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to branch master
in repository gosa.
commit af17c4ae41bc6c2fa6667a940865c0e0cbeeb4e9
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Sun Jan 31 12:58:04 2016 +0100
debian/patches: Add 1024_dont-overescape-dollar-signs-in-smb-passwords.patch. Don't over-escape "$" characters in passwords provided to the sambaHashHook execution call.
---
...-overescape-dollar-signs-in-smb-passwords.patch | 22 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 23 insertions(+)
diff --git a/debian/patches/1024_dont-overescape-dollar-signs-in-smb-passwords.patch b/debian/patches/1024_dont-overescape-dollar-signs-in-smb-passwords.patch
new file mode 100644
index 0000000..bbaaee6
--- /dev/null
+++ b/debian/patches/1024_dont-overescape-dollar-signs-in-smb-passwords.patch
@@ -0,0 +1,22 @@
+Description: Don't over-escape "$" chars with new base64 encoding of passwords in sambaHashHook
+Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+Abstract:
+ Using base64 encoded password strings in sambaHashHook calls makes it
+ obsolete to double-escape "$" in passwords for the transport from PHP
+ to console-process.
+
+--- a/gosa-core/include/functions.inc
++++ b/gosa-core/include/functions.inc
+@@ -3082,10 +3082,8 @@
+ return ("");
+ }
+ } else {
+- $password = addcslashes($password, '$'); // <- Escape $ twice for transport from PHP to console-process.
+- $password = addcslashes($password, '$');
+- $password = addcslashes($password, '$'); // <- And again once, to be able to use it as parameter for the perl script.
+- $tmp = $config->get_cfg_value("core",'sambaHashHook');
++ $password = addcslashes($password, '$'); // <- Escape "$" once to be able to use it in pw strings in Perl scripts
++ $tmp = $config->get_cfg_value("core",'sambaHashHook');
+ $tmp = preg_replace("/%userPassword/", base64_encode($password), $tmp);
+ $tmp = preg_replace("/%password/", base64_encode($password), $tmp);
+ @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__, $tmp, "Execute");
diff --git a/debian/patches/series b/debian/patches/series
index bb73011..e3e2330 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -28,6 +28,7 @@
1021_disable-sorting-in-DHCP-section-lists.patch
1022_add-b-switch-to-mkntpasswd-script.patch
1023_check-smbhash-creation-for-base64-encoded-pws.patch
+1024_dont-overescape-dollar-signs-in-smb-passwords.patch
2001_fix-smarty-location.patch
2002_fix-template-location.patch
2003_fix-class-mapping.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/gosa.git
More information about the debian-edu-commits
mailing list