From 7d6294b10cbe21bd7af67ce8b698b1c4ab18238c Mon Sep 17 00:00:00 2001 From: Jacob Parry Date: Mon, 16 May 2016 15:45:56 -0400 Subject: Cast body to a string to ensure that we can perform a regex substitution on it --- oauthlib/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'oauthlib/common.py') 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', body) + body = SANITIZE_PATTERN.sub('\1', str(body)) if 'Authorization' in headers: headers['Authorization'] = '' return '' % ( -- cgit v1.2.1