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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Helios Server
Commits
6f51eb1b
Commit
6f51eb1b
authored
9 years ago
by
Ben Adida
Browse files
Options
Downloads
Patches
Plain Diff
add better error handling of edge cases that are causing the most errors
parent
67adf338
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
helios/views.py
+2
-2
2 additions, 2 deletions
helios/views.py
helios_auth/auth_systems/google.py
+3
-1
3 additions, 1 deletion
helios_auth/auth_systems/google.py
with
5 additions
and
3 deletions
helios/views.py
+
2
−
2
View file @
6f51eb1b
...
@@ -592,7 +592,7 @@ def one_election_cast_confirm(request, election):
...
@@ -592,7 +592,7 @@ def one_election_cast_confirm(request, election):
user
=
get_user
(
request
)
user
=
get_user
(
request
)
# if no encrypted vote, the user is reloading this page or otherwise getting here in a bad way
# if no encrypted vote, the user is reloading this page or otherwise getting here in a bad way
if
not
request
.
session
.
has_key
(
'
encrypted_vote
'
):
if
(
not
request
.
session
.
has_key
(
'
encrypted_vote
'
)
)
or
request
.
session
[
'
encrypted_vote
'
]
==
None
:
return
HttpResponseRedirect
(
settings
.
URL_HOST
)
return
HttpResponseRedirect
(
settings
.
URL_HOST
)
# election not frozen or started
# election not frozen or started
...
...
This diff is collapsed.
Click to expand it.
helios_auth/auth_systems/google.py
+
3
−
1
View file @
6f51eb1b
...
@@ -33,7 +33,9 @@ def get_auth_url(request, redirect_url):
...
@@ -33,7 +33,9 @@ def get_auth_url(request, redirect_url):
def
get_user_info_after_auth
(
request
):
def
get_user_info_after_auth
(
request
):
flow
=
get_flow
(
request
.
session
[
'
google-redirect-url
'
])
flow
=
get_flow
(
request
.
session
[
'
google-redirect-url
'
])
del
request
.
session
[
'
google-redirect-url
'
]
if
not
request
.
GET
.
has_key
(
'
code
'
):
return
None
code
=
request
.
GET
[
'
code
'
]
code
=
request
.
GET
[
'
code
'
]
credentials
=
flow
.
step2_exchange
(
code
)
credentials
=
flow
.
step2_exchange
(
code
)
...
...
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