File: 1029_better-whitespace-cleanup-in-genuid.patch

package info (click to toggle)
gosa 2.7.4%2Breloaded3-16
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 38,716 kB
  • sloc: php: 87,789; perl: 14,364; xml: 4,987; javascript: 4,127; sh: 887; pascal: 306; sql: 263; python: 162; makefile: 76
file content (16 lines) | stat: -rw-r--r-- 663 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: Remove all white-spaces from attributes before generating the UIDs.
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Abstract:
 During development of the GOsa² SchoolManager Add-On, it was discovered that in
 some cases the gen_uids() function would return UIDs that contained blanks.

--- a/gosa-core/include/functions.inc
+++ b/gosa-core/include/functions.inc
@@ -3804,6 +3804,7 @@
              $value = iconv('UTF-8', 'US-ASCII//TRANSLIT', $value);
         }
         $value = preg_replace('/[^(\x20-\x7F)]*/','',$value);
+        $value = preg_replace('/\s/', '', $value);
         $attributes[$name] = strtolower($value);
     }