Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YDA-6012 bug fix for silent uploading failure #377

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

FuHsinyu
Copy link
Member

@FuHsinyu FuHsinyu commented Dec 4, 2024

  1. Set CSRF token lifetime tied to the life of the session. Tested in DGK acceptance env (1.9.4) and local dev (1.10 and 1.9.4)
  2. Regarding the error loggings, csrf's error catch requires logging level of python logging module to be at INFO level (which is a more detailed level than what we currently have). We were not sure if we should increase the logging level of the whole application, since the failure is now resolved. So I didn't add loggings, but I tested the logging, and added the code snippet in https://utrechtuniversity.atlassian.net/browse/YDA-6012

@stsnel stsnel self-assigned this Dec 4, 2024
Copy link
Member

@stsnel stsnel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 👍 , LGTM!

As for the logging, can we adjust the CSRF error handler at

def csrf_error(e: Exception) -> Response:
to log the fact that a CSRF error occurred, along with the request path and username (if available)? That way we don't have to change global log levels for the application. The logging change can go in a separate PR.

@stsnel stsnel merged commit e9d34ed into development Dec 4, 2024
16 checks passed
@stsnel stsnel deleted the YDA-6012-bugfix-silent-uploading-failure branch December 4, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants