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

FISH-10521 Escape HTTP Characters in REST Interface #7216

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* only if the new code is made subject to such option by the copyright
* holder.
*/
// Portions Copyright [2019-2021] [Payara Foundation and/or its affiliates]
// Portions Copyright 2019-2025 Payara Foundation and/or its affiliates

package org.glassfish.admin.rest.provider;

Expand Down Expand Up @@ -330,7 +330,7 @@ protected String processChildren(List<ActionReport.MessagePart> parts) {
result.append("<li><table border=\"1\" style=\"border-collapse: collapse\">")
.append("<tr><td>Message</td>")
.append("<td>")
.append(part.getMessage())
.append(ResourceUtil.encodeString(part.getMessage()))
.append("</td></tr><td>Properties</td><td>")
.append(getHtml(part.getProps()))
.append("</td></tr>");
Expand Down Expand Up @@ -369,7 +369,7 @@ protected String getHtmlRepresentation(Object object) {
result = getHtml((Map) object);
}
} else {
result = object.toString();
result = ResourceUtil.encodeString(object.toString());
}

return result;
Expand Down