Fix for security issue #918

This commit is contained in:
Simon Willison 2020-08-09 09:03:17 -07:00
commit 7f10f0f766
2 changed files with 20 additions and 1 deletions

View file

@ -52,7 +52,7 @@
{% endif %}
<p>
<button id="sql-format" type="button" hidden>Format SQL</button>
{% if canned_query %}<input type="hidden" name="csrftoken" value="{{ csrftoken() }}">{% endif %}
{% if canned_write %}<input type="hidden" name="csrftoken" value="{{ csrftoken() }}">{% endif %}
<input type="submit" value="Run SQL">
</p>
</form>