Skip to content

Conversation

@tatterdemalion
Copy link

If params contain non-ascii characters merging fails.

If params contain non-ascii characters merging fails.
@aaugustin
Copy link
Contributor

This pull request shifts the problem but doesn't really solve it.

If SECRET_KEY is unicode (for instance because the settings module has from __future__ import unicode_literals) the same problem will still occur.

That said, it's a valid bug.

@Fak3
Copy link

Fak3 commented Nov 13, 2013

maybe this will be better:

    params = force_text(settings.SECRET_KEY) + data['sql'].decode('ascii', 'replace') + data['params'].decode('ascii', 'replace')

@fedosov
Copy link

fedosov commented Nov 14, 2013

👍

@aaugustin aaugustin closed this in 80e94bd Nov 14, 2013
ryneeverett pushed a commit to ryneeverett/django-debug-toolbar that referenced this pull request Oct 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants