Skip to content

Commit

Permalink
Merge pull request nextcloud#453 from nextcloud/enh/452/set-nonce
Browse files Browse the repository at this point in the history
Set proper nonce on the outer iframe
  • Loading branch information
juliusknorr authored Mar 18, 2019
2 parents d93b0cc + 16c82f5 commit d8db33b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/documents.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ var documentsMain = {
'<input name="access_token" value="' + access_token + '" type="hidden"/></form>';

// iframe that contains the Collabora Online Viewer
var frame = '<iframe id="loleafletframe_viewer" name= "loleafletframe_viewer" style="width:100%;height:100%;position:absolute;"/>';
var frame = '<iframe id="loleafletframe_viewer" name="loleafletframe_viewer" nonce="' + btoa(OC.requestToken) + '" style="width:100%;height:100%;position:absolute;"/>';

$('#revViewer').append(form);
$('#revViewer').append(frame);
Expand Down
2 changes: 1 addition & 1 deletion js/viewer/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ var odfViewer = {

OC.addStyle('richdocuments', 'mobile');

var $iframe = $('<iframe id="richdocumentsframe" scrolling="no" allowfullscreen src="'+viewer+'" />');
var $iframe = $('<iframe id="richdocumentsframe" nonce="' + btoa(OC.requestToken) + '" scrolling="no" allowfullscreen src="'+viewer+'" />');
$.get(OC.generateUrl('/apps/richdocuments/settings/check'), function() {
$iframe.src = viewer;
}) .fail(function() {
Expand Down

0 comments on commit d8db33b

Please sign in to comment.