Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d4df94b

Browse files
committed
Be much more permissive in what we accept in section names; there has been
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.
1 parent d807570 commit d4df94b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/ConfigParser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def remove_section(self, section):
387387
# of \w, _ is allowed in section header names.
388388
SECTCRE = re.compile(
389389
r'\[' # [
390-
r'(?P<header>[-\w_.*,(){} ]+)' # a lot of stuff found by IvL
390+
r'(?P<header>[^]]+)' # very permissive!
391391
r'\]' # ]
392392
)
393393
OPTCRE = re.compile(

0 commit comments

Comments
 (0)