diff options
author | Jacob Parry <jacob@jacobparry.ca> | 2016-05-16 15:45:56 -0400 |
---|---|---|
committer | Jacob Parry <jacob@jacobparry.ca> | 2016-05-16 15:45:56 -0400 |
commit | 7d6294b10cbe21bd7af67ce8b698b1c4ab18238c (patch) | |
tree | ecc4f471070bd4961d37d42782f7fad11710b77a /oauthlib/common.py | |
parent | e1fb8a41c591d75bee8bbb9216d2b14ac41de54b (diff) | |
download | oauthlib-7d6294b10cbe21bd7af67ce8b698b1c4ab18238c.tar.gz |
Cast body to a string to ensure that we can perform a regex substitution on it
Diffstat (limited to 'oauthlib/common.py')
-rw-r--r-- | oauthlib/common.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/oauthlib/common.py b/oauthlib/common.py index ab2f95d..e5ab6eb 100644 --- a/oauthlib/common.py +++ b/oauthlib/common.py @@ -416,7 +416,7 @@ class Request(object): body = self.body headers = self.headers.copy() if body: - body = SANITIZE_PATTERN.sub('\1<SANITIZED>', body) + body = SANITIZE_PATTERN.sub('\1<SANITIZED>', str(body)) if 'Authorization' in headers: headers['Authorization'] = '<SANITIZED>' return '<oauthlib.Request url="%s", http_method="%s", headers="%s", body="%s">' % ( |