Skip to content

Commit

Permalink
YDA-6012: fix silent failure during uploads
Browse files Browse the repository at this point in the history
When uploading a large file via the Yoda portal, silent failures could occur due to
the CSRF token expiring during the upload. This change makes the CSRF token
valid for the duration of the session, in order to prevent this problem.
  • Loading branch information
FuHsinyu authored Dec 4, 2024
1 parent 4656a29 commit e9d34ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def load_admin_setting() -> Dict[str, Any]:

# CSRF protection.
csrf = CSRFProtect(app)
app.config['WTF_CSRF_TIME_LIMIT'] = None # Set CSRF token lifetime tied to the life of the session.


@app.before_request
Expand Down

0 comments on commit e9d34ed

Please sign in to comment.