Ran
|
Files
11
|
Run time
1s
|
Badge
Embed ▾
README BADGES
|
travis-ci
<a href="https://github.com/lepture/flask-wtf/commit/<a class=hub.com/lepture/flask-wtf/commit/1abe8ffd1676c5518f0a5dd33269358bd6fc06fa">1abe8ffd1<a href="https://github.com/lepture/flask-wtf/commit/1abe8ffd1676c5518f0a5dd33269358bd6fc06fa">">Fix csrf.error_handler example in docs The example code in the docs for @csrf.error_handler does not work correctly (as noted in #200). Rather than showing a custom error page for CSRF violations, it silences all CSRF errors across the app. This change alters the example to correctly show a custom error page, using the code written by @wobsta in #200. I tested the new example code in versions 0.12 and 0.11. From testing the existing example on 0.11 and 0.12, it looks like what actually happened here is a regression, specifically during the refactor in </a><a class="double-link" href="https://github.com/lepture/flask-wtf/commit/<a class="double-link" href="https://github.com/lepture/flask-wtf/commit/e85808b9e7432f4e5b782032e32ad8cc3939e7d1">e85808b9e</a>">e85808b9e</a><a href="https://github.com/lepture/flask-wtf/commit/1abe8ffd1676c5518f0a5dd33269358bd6fc06fa">. A fix was proposed but rejected in #209. In lieu of making that change or otherwise patching this, it'd be good to update the docs with a working example. Someone using the existing example code with version 0.12 would actually not have CSRF protection at all.
359 of 408 relevant lines covered (87.99%)
0.88 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|