We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c67f252 commit bce32ffCopy full SHA for bce32ff
1 file changed
roda-ui/roda-wui/src/main/java/org/roda/wui/api/v2/services/JobService.java
@@ -246,7 +246,7 @@ public JobUserDetails buildJobUserDetails(User user) {
246
public StreamResponse retrieveJobAttachment(String jobId, String attachmentId) throws NotFoundException, GenericException {
247
Path filePath = RodaCoreFactory.getJobAttachmentsDirectoryPath().resolve(jobId).resolve(attachmentId);
248
249
- if (!RodaCoreFactory.getJobAttachmentsDirectoryPath().startsWith(filePath)) {
+ if (!filePath.startsWith(RodaCoreFactory.getJobAttachmentsDirectoryPath())) {
250
throw new GenericException("Attempt to retrieve files outside the permitted scope");
251
}
252
0 commit comments