Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(14444)

Issue 6499104: Fix for Issue #1: Protection from CSRF for OAuth 2.0

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by alexv
Modified:
11 years, 7 months ago
Reviewers:
erichiggins
Visibility:
Public.

Description

Issue tracker: http://code.google.com/p/gae-simpleauth/issues/detail?id=1

Patch Set 1 #

Total comments: 12

Patch Set 2 : Changes according to the comments #

Patch Set 3 : Simplified version #

Total comments: 16

Patch Set 4 : Better CSRF token validation; nitpicks #

Total comments: 5

Patch Set 5 : Generating token as b64encode(token_key:timestamp) #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+424 lines, -44 lines) Patch
M README View 1 2 3 4 3 chunks +57 lines, -3 lines 0 comments Download
M simpleauth/handler.py View 1 2 3 4 6 chunks +86 lines, -16 lines 2 comments Download
M tests/__init__.py View 3 chunks +107 lines, -2 lines 0 comments Download
M tests/handler_test.py View 1 2 3 4 12 chunks +174 lines, -23 lines 0 comments Download

Messages

Total messages: 12
alexv
http://codereview.appspot.com/6499104/diff/1/tests/handler_test.py File tests/handler_test.py (right): http://codereview.appspot.com/6499104/diff/1/tests/handler_test.py#newcode6 tests/handler_test.py:6: import hmac Doesn't look like hmac is really needed ...
11 years, 7 months ago (2012-09-13 12:54:59 UTC) #1
alexv
http://codereview.appspot.com/6499104/diff/1/tests/handler_test.py File tests/handler_test.py (right): http://codereview.appspot.com/6499104/diff/1/tests/handler_test.py#newcode13 tests/handler_test.py:13: from webapp2 import WSGIApplication, Route, RequestHandler, cached_property cached_property isn't ...
11 years, 7 months ago (2012-09-13 13:04:12 UTC) #2
alexv
http://codereview.appspot.com/6499104/diff/1/README File README (right): http://codereview.appspot.com/6499104/diff/1/README#newcode118 README:118: with the provided 'state' parameter on callback. I should ...
11 years, 7 months ago (2012-09-13 13:20:12 UTC) #3
alexv
http://codereview.appspot.com/6499104/diff/1/simpleauth/handler.py File simpleauth/handler.py (right): http://codereview.appspot.com/6499104/diff/1/simpleauth/handler.py#newcode477 simpleauth/handler.py:477: _CSRF_TOKEN_TIMEOUT = 1*60*60 # 1 hour Rename it to ...
11 years, 7 months ago (2012-09-13 13:26:52 UTC) #4
alexv
http://codereview.appspot.com/6499104/diff/1/README File README (right): http://codereview.appspot.com/6499104/diff/1/README#newcode118 README:118: with the provided 'state' parameter on callback. On 2012/09/13 ...
11 years, 7 months ago (2012-09-13 19:40:42 UTC) #5
alexv
http://codereview.appspot.com/6499104/diff/7002/simpleauth/handler.py File simpleauth/handler.py (right): http://codereview.appspot.com/6499104/diff/7002/simpleauth/handler.py#newcode483 simpleauth/handler.py:483: Token would normally be stored in a user session ...
11 years, 7 months ago (2012-09-13 21:39:43 UTC) #6
erichiggins
Just a few comments (some are nitpicks), but one potential security issue. http://codereview.appspot.com/6499104/diff/7002/simpleauth/handler.py File simpleauth/handler.py ...
11 years, 7 months ago (2012-09-15 02:32:54 UTC) #7
alexv
Hey, Eric. Thanks so much for the review. Could you take a look at it ...
11 years, 7 months ago (2012-09-15 11:25:41 UTC) #8
erichiggins
Sure thing, Alex. Great work so far! Just a couple of comments below for your ...
11 years, 7 months ago (2012-09-15 15:54:41 UTC) #9
alexv
Actually, having b64encode(token:timestamp) not only makes it a better use, it just feels right. I've ...
11 years, 7 months ago (2012-09-16 12:14:30 UTC) #10
erichiggins
LGTM! The API docs confirm that using urllib, urllib2, and httplib all go through urlfetch ...
11 years, 7 months ago (2012-09-16 19:53:31 UTC) #11
alexv
11 years, 7 months ago (2012-09-16 20:52:31 UTC) #12
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b