Properly encode the copy/move message URL.

This commit is contained in:
artnaseef 2020-08-31 09:48:13 -07:00
parent 5c8086961f
commit 4450c17c1c
1 changed files with 11 additions and 3 deletions

View File

@ -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;
}