Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Helios Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Helios Server
Commits
de88df54
Commit
de88df54
authored
Aug 3, 2009
by
Ben Adida
Browse files
Options
Downloads
Patches
Plain Diff
fixed iacr csrf, upgraded booth to be multi-question able
parent
2f76151a
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
heliosbooth
+1
-1
1 addition, 1 deletion
heliosbooth
iacr/view_utils.py
+4
-0
4 additions, 0 deletions
iacr/view_utils.py
iacr/views.py
+5
-0
5 additions, 0 deletions
iacr/views.py
with
10 additions
and
1 deletion
heliosbooth
@
baec08ec
Subproject commit
ee91b5c4d921848f00f064202b453147fea85f6e
Subproject commit
baec08ec0005b3f6e515de3d6c7c8483a265e974
This diff is collapsed.
Click to expand it.
iacr/view_utils.py
+
4
−
0
View file @
de88df54
...
...
@@ -22,5 +22,9 @@ def render_template(request, template_name, vars = {}):
vars_with_user
[
'
user
'
]
=
get_user
(
request
)
vars_with_user
[
'
settings
'
]
=
settings
# csrf protection
if
request
.
session
.
has_key
(
'
csrf_token
'
):
vars_with_user
[
'
csrf_token
'
]
=
request
.
session
[
'
csrf_token
'
]
return
render_to_response
(
'
iacr/templates/%s.html
'
%
template_name
,
vars_with_user
)
This diff is collapsed.
Click to expand it.
iacr/views.py
+
5
−
0
View file @
de88df54
...
...
@@ -9,12 +9,15 @@ from view_utils import *
import
helios.views
import
helios
from
helios.crypto
import
utils
as
cryptoutils
from
auth.security
import
*
from
django.core.urlresolvers
import
reverse
from
django.http
import
HttpResponse
,
HttpResponseRedirect
,
Http404
,
HttpResponseNotAllowed
ELECTION_SHORT_NAME
=
'
iacr09
'
def
get_election
():
return
Election
.
get_by_key_name
(
ELECTION_SHORT_NAME
)
...
...
@@ -66,6 +69,8 @@ def cast_confirm(request):
else
:
form
=
LoginForm
(
request
.
POST
)
check_csrf
(
request
)
if
form
.
is_valid
():
user
=
User
.
get_by_type_and_id
(
'
password
'
,
form
.
cleaned_data
[
'
username
'
])
if
password_check
(
user
,
form
.
cleaned_data
[
'
password
'
]):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment