diff options
| author | Alexey Homza | 2014-02-18 11:33:15 +0200 |
|---|---|---|
| committer | Alexey Homza | 2014-02-18 11:33:15 +0200 |
| commit | 9eec3b68ebca42656ca15d50bbb1dd6b22ab95a7 (patch) | |
| tree | aa0309af90d42c625b56d9e1a9dbdc2c33d21211 | |
| parent | 06c3824c031d19013a4db8f844c503ab8e6b80ea (diff) | |
| download | django-debug-toolbar-9eec3b68ebca42656ca15d50bbb1dd6b22ab95a7.tar.bz2 | |
Update forms.py
Fix UnicodeDecodeError exception when sql params has unicode characters
| -rw-r--r-- | debug_toolbar/panels/sql/forms.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/debug_toolbar/panels/sql/forms.py b/debug_toolbar/panels/sql/forms.py index 582f611..58a4dba 100644 --- a/debug_toolbar/panels/sql/forms.py +++ b/debug_toolbar/panels/sql/forms.py @@ -80,7 +80,7 @@ class SQLSelectForm(forms.Form): items = [settings.SECRET_KEY, data['sql'], data['params']] # Replace lines endings with spaces to preserve the hash value # even when the browser normalizes \r\n to \n in inputs. - items = [force_text(' '.join(item.splitlines())) for item in items] + items = [' '.join(force_text(item).splitlines()) for item in items] return hashlib.sha1(''.join(items).encode('utf-8')).hexdigest() @property |
