Commits

Etienne Perot committed 761bcdc Merge

Merge branch 'master' into pupfiles

* master:
Make section and setting regexes a lot more permissive

Comments (0)

Files changed (1)

lib/puppet/util/ini_file.rb

 module Util
   class IniFile
 
-    SECTION_REGEX = /^\s*\[([\w\d\.\\\/\-\:]+)\]\s*$/
-    SETTING_REGEX = /^(\s*)([\w\d\.\\\/\-]+)(\s*=\s*)([\S\s]*\S)\s*$/
+    SECTION_REGEX = /^\s*\[([ \w\d\.,\\\/\-_:;'"!?@#\$%^&*()\|]+?)\]\s*$/
+    SETTING_REGEX = /^(\s*)([ \w\d\.,\\\/\-_:;'"!?@#\$%^&*()\|]+?)(\s*=\s*)([\S\s]*?\S|)\s*$/
     COMMENTED_SETTING_REGEX = /^(\s*)[#;]+(\s*)([\w\d\.\\\/\-]+)(\s*=\s*)([\S\s]*\S)\s*$/
 
     def initialize(content, key_val_separator = ' = ', is_path = true)