Skip to content

Commit

Permalink
SAK-44816 - fix small error in earlier JIRA (sakaiproject#8912)
Browse files Browse the repository at this point in the history
44661
  • Loading branch information
csev authored Dec 17, 2020
1 parent 6553915 commit 1b3bdb4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1918,8 +1918,8 @@ public static String[] postLaunchJWT(Properties toolProps, Properties ltiProps,
}
}

String form_id = java.util.UUID.randomUUID().toString();
String html = "<form action=\"" + launch_url + "\" id=\""+ form_id + "\" method=\"POST\">\n"
Integer form_id = jws.hashCode();
String html = "<form action=\"" + launch_url + "\" id=\"jwt-launch-"+ form_id + "\" method=\"POST\">\n"
+ " <input type=\"hidden\" name=\"id_token\" value=\"" + BasicLTIUtil.htmlspecialchars(jws) + "\" />\n";

if ( state != null ) {
Expand All @@ -1934,7 +1934,7 @@ public static String[] postLaunchJWT(Properties toolProps, Properties ltiProps,
if ( ! dodebug ) {
String launch_error = rb.getString("error.submit.timeout")+" "+launch_url;
html += "<script>\n";
html += "setTimeout(document.getElementById(\"" + form_id + "\").submit();\n";
html += "setTimeout(function() { document.getElementById(\"jwt-launch-" + form_id + "\").submit(); }, 200 );\n";
html += "setTimeout(function() { alert(\""+BasicLTIUtil.htmlspecialchars(launch_error)+"\"); }, 4000);\n";
html += "</script>\n";
} else {
Expand Down

0 comments on commit 1b3bdb4

Please sign in to comment.