From a05075dc4f316a600cd1a2374f783ddb0aaf2a0e Mon Sep 17 00:00:00 2001 From: Jonas Trappenberg Date: Mon, 9 Jun 2014 10:21:42 -0700 Subject: Copy variables dict before scrubbing secrets. This dict is the actual variables dict. Changing its members will directly change the values of the current object. The __repr__ function overwrites both secrets with stars. --- oauthlib/oauth1/rfc5849/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oauthlib/oauth1/rfc5849/__init__.py b/oauthlib/oauth1/rfc5849/__init__.py index 4589d54..405bf1f 100644 --- a/oauthlib/oauth1/rfc5849/__init__.py +++ b/oauthlib/oauth1/rfc5849/__init__.py @@ -104,7 +104,7 @@ class Client(object): raise ValueError('rsa_key is required when using RSA signature method.') def __repr__(self): - attrs = vars(self) + attrs = vars(self).copy() attrs['client_secret'] = '****' if attrs['client_secret'] else None attrs['resource_owner_secret'] = '****' if attrs['resource_owner_secret'] else None attribute_str = ', '.join('%s=%s' % (k, v) for k, v in attrs.items()) -- cgit v1.2.1