-
Notifications
You must be signed in to change notification settings - Fork 349
Development: Delete old files properly when updating file submissions
#6849
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
Conversation
Co-authored-by: Johannes Stöhr <[email protected]>
…stead of the fileUploadSubmission parameter.
80022be
|
|
||
| // We need to ensure that we can access the store file and the stored file is the same as was passed to us in the request | ||
| final var storedFileHash = DigestUtils.md5Hex(Files.newInputStream(Path.of(newLocalFilePath))); | ||
| final var storedFileHash = DigestUtils.md5Hex(Files.newInputStream(Path.of(savePath))); |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression
Strohgelaender
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The server style action is currently failing, please run spotlessApply to fix the reported issues.
src/main/java/de/tum/in/www1/artemis/service/FileUploadSubmissionService.java
Outdated
Show resolved
Hide resolved
Development: Load participation from DB with file-upload submissionsDevelopment: Use participation from DB with file-upload submissions
Development: Use participation from DB with file-upload submissionsDevelopment: Use participation to get file-upload submissions from DB
RY997
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reapprove
Development: Use participation to get file-upload submissions from DBDevelopment: Delete old files properly when updating file submissions
krusche
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me and makes sense 👍
dearjasmina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reapprove
Strohgelaender
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good.
Checklist
General
Server
Motivation and Context
The parameter fileUploadSubmission is currently getting used for getting the last submission in FileUploadSubmissionService. The data of this parameter is under the control of the user, which may pose certain risks.
Description
Instead of FileUploadSubmission fileUploadSubmission, we now use StudentParticipation participation for getting the last submission in FileUploadSubmissionService, as the data of this parameter is not under the control of the user.
Steps for Testing
We just want to make sure that I didn't accidentally break the implementation.
Prerequisites:
Fileupload Exercise (Instructor, Student):
Review Progress
Performance Review
Code Review
Manual Tests
Test Coverage