-
Notifications
You must be signed in to change notification settings - Fork 280
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
[GWC-1171] Improve handling special characters in the GWC Demos Page #1173
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.
Looks overall good, one QA failure.
import org.springframework.util.Assert; | ||
|
||
public class Demo { | ||
|
||
@SuppressWarnings("PMD.AvoidPrintStackTrace") |
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.
Causes QA failure:
06:26:04,481 [INFO] PMD Failure: org.geowebcache.demo.Demo:103 Rule:AvoidPrintStackTrace Priority:3 Avoid printStackTrace(); use a logger call instead..
06:26:04,485 [INFO] PMD Failure: org.geowebcache.demo.Demo:103 Rule:AvoidPrintStackTrace Priority:3 Avoid printStackTrace(); use a logger call instead..
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.
Fixed.
There was a Java heap space error in the downstream build. |
The backport to
stderr
stdout
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.23.x 1.23.x
# Navigate to the new working tree
cd .worktrees/backport-1.23.x
# Create a new branch
git switch --create backport-1173-to-1.23.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 49b26ff7b0b49113d1e0ed3f45ffc52b094934eb
# Push it to GitHub
git push --set-upstream origin backport-1173-to-1.23.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.23.x Then, create a pull request where the |
#1171
This PR updates the GWC Demos Page to properly escape special characters from GeoServer catalog information. One thing to note here is that StringEscapeUtils::escapeEcmaScript is not secure when used in HTML attributes so the OWASP Encoder library is used instead.