Skip to content

Commit

Permalink
SAK-27568 show security message and pop up syllabus redirects in a ne…
Browse files Browse the repository at this point in the history
…w window if http iframe is inside https sakai instance

making sure iframe height is correct


git-svn-id: https://source.sakaiproject.org/svn/syllabus/trunk@311714 66ffb92e-73f9-0310-93c1-f5514f145a0a
  • Loading branch information
Bryan Holladay committed Aug 8, 2014
1 parent 444cdd1 commit b8dea97
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ public void encodeBegin(FacesContext context, UIComponent component)
}
boolean secureHttp = ServerConfigurationService.getServerUrl().startsWith("https");
if(redirectUrl.startsWith("http:") && secureHttp){
writer.write("<script type='text/javascript'>window.open('" + redirectUrl + "');$(window).load(function (){mySetMainFrameHeight(mainframeId);});</script>");
writer.write("<script type='text/javascript'>window.open('" + redirectUrl + "');</script>");
writer.write(rb.getFormattedMessage("iframeSecurity", new String[]{redirectUrl}));
}else{
writer.write("<script type='text/javascript'>setTimeout(function(){mySetMainFrameHeight(mainframeId);}, 1000);</script>");
writer.write("<iframe src=\"" + redirectUrl + "\"");
writer.write(" width=\"" + widthIn + "\"");
writer.write(" height=\"" + heightIn + "\"");
Expand Down

0 comments on commit b8dea97

Please sign in to comment.