Skip to content

Commit

Permalink
Merge pull request #2796 from Sarangan0219/msgid_encoding
Browse files Browse the repository at this point in the history
Add OWASP encoding to msgId
  • Loading branch information
tgtshanika committed Oct 7, 2020
2 parents 518b7af + 2cd76ad commit 5a23bcb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
<script type="text/javascript">
var msgId;
<%
if(CharacterEncoder.getSafeText(request.getParameter("msgId")) == null){
if(Encode.forJavaScript(request.getParameter("msgId")) == null){
%>
msgId = '<%="MSG" + System.currentTimeMillis() + Math.random()%>';
<%
} else {
%>
msgId = '<%=CharacterEncoder.getSafeText(request.getParameter("msgId"))%>';
msgId = '<%=Encode.forJavaScript(request.getParameter("msgId"))%>';
<%
}
%>
Expand Down

0 comments on commit 5a23bcb

Please sign in to comment.