-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Warn when deleting symlinks targeting locations outside temp dir #4306
Conversation
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.
It was an honor to review your code❕
It’s so clean that I only have one piece of feedback—and even that is just a minor code style improvement.
Great work!
assertThat(listener.stream(Level.WARNING)).map(LogRecord::getMessage) // | ||
.contains(("Deleting symbolic link from location inside of temp dir (%s) " | ||
+ "to location outside of temp dir (%s) but not the target file/directory").formatted( | ||
symbolicLink, directoryOutsideTempDir)); |
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.
assertThat(listener.stream(Level.WARNING)).map(LogRecord::getMessage) // | |
.contains(("Deleting symbolic link from location inside of temp dir (%s) " | |
+ "to location outside of temp dir (%s) but not the target file/directory").formatted( | |
symbolicLink, directoryOutsideTempDir)); | |
assertThat(listener.stream(Level.WARNING)) // | |
.map(LogRecord::getMessage) // | |
.contains(("Deleting symbolic link from location inside of temp dir (%s) " | |
+ "to location outside of temp dir (%s) but not the target file/directory") // | |
.formatted(symbolicLink, directoryOutsideTempDir)); |
This change looked a bit cleaner to me.
It's a very minor adjustment, so feel free to ignore it if you don’t think it’s necessary!
This is the change I’d like to make, but I’m not sure if it has been applied correctly... 😵💫
If you accept my change and it ends up failing at the check stage, I sincerely apologize..
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.
Done in 8c1d995
Overview
Resolves #4303.
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@API
annotations