mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-06 09:57:57 +00:00
CSRF verification failure now returns HTTP 403 Forbidden, not 200 OK
This commit is contained in:

committed by
Magnus Hagander

parent
6008f93843
commit
a923f93b17
@ -152,9 +152,11 @@ def sitemap(request):
|
||||
|
||||
@nocache
|
||||
def csrf_failure(request, reason=''):
|
||||
return render_to_response('errors/csrf_failure.html', {
|
||||
resp = render_to_response('errors/csrf_failure.html', {
|
||||
'reason': reason,
|
||||
})
|
||||
resp.status_code = 403 # Forbidden
|
||||
return resp
|
||||
|
||||
# Basic information about the connection
|
||||
@cache(seconds=30)
|
||||
|
Reference in New Issue
Block a user