Encode token in viewer

This commit is contained in:
Victor Dubiniuk 2015-05-14 20:39:03 +03:00
parent 87f6996ce0
commit 608eccac55

View File

@ -63,7 +63,7 @@ var odfViewer = {
//Public page, files app, etc //Public page, files app, etc
var dirName = $('#dir').val()!='/' ? $('#dir').val() + '/' : '/'; var dirName = $('#dir').val()!='/' ? $('#dir').val() + '/' : '/';
var location = OC.filePath('documents', 'ajax', 'download.php') + '?path=' + encodeURIComponent(dirName) + encodeURIComponent(filename) var location = OC.filePath('documents', 'ajax', 'download.php') + '?path=' + encodeURIComponent(dirName) + encodeURIComponent(filename)
+ '&requesttoken=' + oc_requesttoken; + '&requesttoken=' + encodeURIComponent(oc_requesttoken);
OC.addStyle('documents', '3rdparty/webodf/editor'); OC.addStyle('documents', '3rdparty/webodf/editor');
} }