Skip to content
This repository

Added decorator to block non-POST requests on login #152

Merged
merged 1 commit into from about 1 year ago

2 participants

Ramon Dennis Bunskoek
Ramon

Added a decorator to block non-POST request on fiber_login function to make sure IE6 does not trigger a 500 error.

Dennis Bunskoek dbunskoek merged commit 07bb0d8 into from February 11, 2013
Dennis Bunskoek dbunskoek closed this February 11, 2013
Ramon ramonakira deleted the branch April 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Feb 07, 2013
Ramon Add decorator to block non-POST requests on login 4ce0096
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. 2  fiber/admin_views.py
2  fiber/admin_views.py
... ...
@@ -1,4 +1,5 @@
1 1
 from django.contrib.admin.views.decorators import staff_member_required
  2
+from django.views.decorators.http import require_POST
2 3
 from django.contrib.auth import authenticate, login
3 4
 from django.http import HttpResponse, HttpResponseRedirect
4 5
 from django.utils import simplejson
@@ -7,6 +8,7 @@
7 8
 from .models import Page
8 9
 
9 10
 
  11
+@require_POST
10 12
 def fiber_login(request):
11 13
     username = request.POST['username']
12 14
     password = request.POST['password']
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.