diff options
author | Clay Gerrard <clay.gerrard@gmail.com> | 2023-04-04 15:55:53 -0500 |
---|---|---|
committer | Clay Gerrard <clay.gerrard@gmail.com> | 2023-04-28 10:03:59 -0500 |
commit | ab03e057d774b8a3b9b5310c10a76b282df020ad (patch) | |
tree | 8f223e8721782b463ddf69b5f08aaf873cc9992a /swift/common/utils/__init__.py | |
parent | c95f8e6c050bbe9244122100ca90e6f335c73ab7 (diff) | |
download | swift-ab03e057d774b8a3b9b5310c10a76b282df020ad.tar.gz |
Make all config parsing case-sensitive
This effects both daemon config parsing and paste-deploy config parsing
when using conf.d. When the WSGI servers were loaded from a flat file
they have always been case-sensitive. This difference was surprising
(who wants anything case-insensitive?) and potentially dangerous for
values like RECLAIM_AGE.
UpgradeImpact:
Previously the option keys in swift's configuration .ini files were
sometimes parsed in a case-insensitive manner, so you could use
CLIENT_TIMEOUT and the daemons would recognize you meant client_timeout.
Now upper-case or mixed-case option names, such as CLIENT_TIMEOUT or
Client_Timeout, will be ignored.
Change-Id: Idd8e552d9fe98b84d7cee1adfa431ea3ae93345d
Diffstat (limited to 'swift/common/utils/__init__.py')
-rw-r--r-- | swift/common/utils/__init__.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/swift/common/utils/__init__.py b/swift/common/utils/__init__.py index 16dc58807..13ec9443a 100644 --- a/swift/common/utils/__init__.py +++ b/swift/common/utils/__init__.py @@ -2542,6 +2542,7 @@ def readconf(conf_path, section_name=None, log_name=None, defaults=None, # values like "1%" (which we want to support for # fallocate_reserve). c = ConfigParser(defaults, interpolation=NicerInterpolation()) + c.optionxform = str # Don't lower-case keys if hasattr(conf_path, 'readline'): if hasattr(conf_path, 'seek'): |