summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmer Katz <omer.drow@gmail.com>2016-05-18 11:20:11 +0300
committerOmer Katz <omer.drow@gmail.com>2016-05-18 11:20:11 +0300
commita3ef5510d4d0e7bed627a5fdc2a078ed1021a446 (patch)
treeecc4f471070bd4961d37d42782f7fad11710b77a
parente1fb8a41c591d75bee8bbb9216d2b14ac41de54b (diff)
parent7d6294b10cbe21bd7af67ce8b698b1c4ab18238c (diff)
downloadoauthlib-a3ef5510d4d0e7bed627a5fdc2a078ed1021a446.tar.gz
Merge pull request #425 from parryjacob/master
Cast body to a string for regex - fixes #424
-rw-r--r--oauthlib/common.py2
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">' % (