Skip to content

Commit

Permalink
Properly encode the copy/move message URL.
Browse files Browse the repository at this point in the history
(cherry picked from commit 4450c17)
  • Loading branch information
artnaseef authored and jbonofre committed Sep 18, 2020
1 parent c9f68f4 commit 177eb71
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions activemq-web-console/src/main/webapp/message.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,17 @@ function confirmAction(id, action) {
return;
}
var value = select.options[selectedIndex].value;
var url = action + ".action?destination=" + value;
url += "&JMSDestination=${requestContext.messageQuery.JMSDestination}";
url += "&messageId=${row.JMSMessageID}&JMSDestinationType=queue&secret=${sessionScope['secret']}";
var url = action + ".action?destination=" + encodeURIComponent(value);
var url = action +
"<c:url value=".action">
<c:param name="JMSDestination" value="${requestContext.messageQuery.JMSDestination}" />
<c:param name="messageId" value="${row.JMSMessageID}" />
<c:param name="JMSDestinationType" value="queue" />
<c:param name="secret" value='${sessionScope["secret"]}' />
</c:url>";
url = url + "&destination=" + encodeURIComponent(value);

if (confirm("Are you sure?"))
location.href=url;
}
Expand Down

0 comments on commit 177eb71

Please sign in to comment.