Created
February 26, 2016 19:09
-
-
Save clayg/8be5b7309f631ba59a32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/swiftclient/client.py b/swiftclient/client.py | |
index 8375fed..7b54bc0 100644 | |
--- a/swiftclient/client.py | |
+++ b/swiftclient/client.py | |
@@ -110,7 +110,7 @@ def safe_value(name, value): | |
prefix_length = int( | |
min(prefix_length, (len(value) ** 2) / 32, len(value) / 2) | |
) | |
- redacted_value = value[0:prefix_length] | |
+ redacted_value = parse_header_string(value)[0:prefix_length] | |
return redacted_value + '...' | |
return value | |
@@ -126,7 +126,7 @@ def scrub_headers(headers): | |
if isinstance(headers, dict): | |
headers = headers.items() | |
headers = [ | |
- (parse_header_string(key), parse_header_string(val)) | |
+ (parse_header_string(key), val) | |
for (key, val) in headers | |
] | |
if not logger_settings.get('redact_sensitive_headers', True): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment