strange copy in constructor · Issue #788 · WebGoat/WebGoat · GitHub
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

strange copy in constructor #788

Closed
zubcevic opened this issue Apr 20, 2020 · 1 comment
Closed

strange copy in constructor #788

zubcevic opened this issue Apr 20, 2020 · 1 comment
Assignees
Labels
bug question waiting for release Issue is fix, waiting on new release
Milestone

Comments

@zubcevic
Copy link
Collaborator

In ProfileUploadRetrieval there is a @PostConstruct with a copy command.

for (int i = 1; i <= 10; i++) {
try {
copy(getFile(getClass().getResource("/images/cats/" + i + ".jpg")), new File(catPicturesDirectory, i + ".jpg"));
} catch (Exception e) {
log.error("Unable to copy pictures" + e.getMessage());
}
}

This seems to always fail, but it does not impact the lesson at all. So maybe remove this code? Now you will see error message during startup of WebGoat.

@nbaars
Copy link
Collaborator

nbaars commented Apr 27, 2020

Fix the copying (with the Spring Boot embedded jar it failed due to not using the classpath resource). The copying is necessary as the paths are returned. The UI reads them from using Thymeleaf.

@nbaars nbaars added the waiting for release Issue is fix, waiting on new release label Apr 27, 2020
@nbaars nbaars added this to the 8.1.0 milestone May 24, 2020
@nbaars nbaars closed this as completed May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug question waiting for release Issue is fix, waiting on new release
Projects
None yet
Development

No branches or pull requests

2 participants