]> granicus.if.org Git - python/commitdiff
Be much more permissive in what we accept in section names; there has been
authorFred Drake <fdrake@acm.org>
Wed, 14 Feb 2001 15:24:17 +0000 (15:24 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 14 Feb 2001 15:24:17 +0000 (15:24 +0000)
at least one addition to the set of accepted characters for every release
since this module was first added; this should take care of the problem
in a more substantial way.

This closes SF bug #132288.

Lib/ConfigParser.py

index 14412a38baecaaa1b2764950117506d8215a8b4d..94179dacc62dab7fb5ce6d91462a35facf05d072 100644 (file)
@@ -387,7 +387,7 @@ class ConfigParser:
     # of \w, _ is allowed in section header names.
     SECTCRE = re.compile(
         r'\['                                 # [
-        r'(?P<header>[-\w_.*,(){} ]+)'        # a lot of stuff found by IvL
+        r'(?P<header>[^]]+)'                  # very permissive!
         r'\]'                                 # ]
         )
     OPTCRE = re.compile(