Skip to content

Commit

Permalink
Fixes a few minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bseeger committed Oct 12, 2023
1 parent e1f9013 commit ff8f8ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/formflow/library/FileController.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public RedirectView delete(
UserFileMap.class);
if (userFileMap == null) {
log.error("User file map not set in session. Unable to update file information");
throw new IndexOutOfBoundsException("Session does not container user file mapping.");
throw new IndexOutOfBoundsException("Session does not contain user file mapping.");
}
userFileMap.removeUserFileFromMap(flow, fileId);
httpSession.setAttribute(SESSION_USERFILES_KEY, objectMapper.writeValueAsString(userFileMap));
Expand Down Expand Up @@ -287,7 +287,8 @@ public ResponseEntity<StreamingResponseBody> downloadSingleFile(
fileId);

if (!submissionId.equals(getSubmissionIdForFlow(httpSession, flow).toString())) {
log.error("Submission ID handed in doesn't match the one associated with the file.");
log.error("There was an attempt to download a file with submission ID '{}', " +
"which does not match the submission of the file being downloaded.", submissionId);
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}

Expand Down

0 comments on commit ff8f8ec

Please sign in to comment.