File: 1154_skip-DN-when-processing-existing-account-settings.patch

package info (click to toggle)
gosa 2.8~git20230203.10abe45%2Bdfsg-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 33,108 kB
  • sloc: php: 32,102; javascript: 10,836; pascal: 3,776; xml: 3,135; sh: 852; python: 162; makefile: 45; perl: 2
file content (15 lines) | stat: -rw-r--r-- 766 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Description: gosa-core/include/functions.inc: The $initialAttrs array in change_password() contains the result of an LDAP fetch which contains the DN (and this is not an array), so skip that.
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

--- a/include/functions.inc
+++ b/include/functions.inc
@@ -2972,7 +2972,8 @@
         // Prepare a special attribute list, which will be used for event hook calls
         $attrsEvent = array();
         foreach($initialAttrs as $name => $value){
-            if(!is_numeric($name))
+            // $value can contain dn => <dn-string>, so skip that
+            if(!is_numeric($name) && is_array($value))
                 $attrsEvent[$name] = $value[0];
         }
         $attrsEvent['dn'] = $initialAttrs['dn'];