summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2012-06-04 16:20:03 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2012-06-04 18:11:08 +0200
commitd5566d026745da8fbfc6648184b5b7890956faf9 (patch)
treecbc04b7a45ed8fbee66828b6b05089c6094db706 /apps
parentca64a4080f48c0656c0be7aadd6fe91d43e40f83 (diff)
downloadnextcloud-server-d5566d026745da8fbfc6648184b5b7890956faf9.tar.gz
nextcloud-server-d5566d026745da8fbfc6648184b5b7890956faf9.zip
prevent xss attacks by manipulating text file names
Diffstat (limited to 'apps')
-rw-r--r--apps/files_texteditor/js/editor.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_texteditor/js/editor.js b/apps/files_texteditor/js/editor.js
index 9d168c1c4f6..70bb74a9101 100644
--- a/apps/files_texteditor/js/editor.js
+++ b/apps/files_texteditor/js/editor.js
@@ -67,7 +67,7 @@ function setSyntaxMode(ext){
function showControls(filename,writeperms){
// Loads the control bar at the top.
// Load the new toolbar.
- var editorbarhtml = '<div id="editorcontrols" style="display: none;"><div class="crumb svg last" id="breadcrumb_file" style="background-image:url(&quot;'+OC.imagePath('core','breadcrumb.png')+'&quot;)"><p>'+filename+'</p></div>';
+ var editorbarhtml = '<div id="editorcontrols" style="display: none;"><div class="crumb svg last" id="breadcrumb_file" style="background-image:url(&quot;'+OC.imagePath('core','breadcrumb.png')+'&quot;)"><p>'+filename.replace(/</, "&lt;").replace(/>/, "&gt;")+'</p></div>';
if(writeperms=="true"){
editorbarhtml += '<button id="editor_save">'+t('files_texteditor','Save')+'</button><div class="separator"></div>';
}