Skip to content

Commit

Permalink
Merge pull request #186 from joelbcastillo/regenerate-session
Browse files Browse the repository at this point in the history
prevent session fixation attacks
  • Loading branch information
joelbcastillo authored Jan 27, 2017
2 parents 5644be7 + 95cea5e commit 076257b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def ldap_login():

if authenticated:
login_user(user)
session.regenerate() # KVSession.regenerate()
session['user_id'] = current_user.get_id()

return_to_url = request.form.get('return_to_url')
Expand Down
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Config:
os.path.join(os.path.abspath(os.path.dirname(__file__)), 'logs/'))

APP_TIMEZONE = os.environ.get('APP_TIMEZONE') or 'US/Eastern'
SESSION_COOKIE_SECURE = os.environ.get('SESSION_COOKIE_SECURE') or True
SESSION_COOKIE_SECURE = os.environ.get('SESSION_COOKIE_SECURE') == 'True'

# Note: BASE_URL and VIEW_REQUEST_ENDPOINT used for the automatic status update job (jobs.py)
BASE_URL = os.environ.get('BASE_URL')
Expand Down

0 comments on commit 076257b

Please sign in to comment.