From 1793e85a523174f66575ca4c40ceecbbe2b1c09d Mon Sep 17 00:00:00 2001
From: Bart Visscher <bartv@thisnet.nl>
Date: Fri, 16 Nov 2012 12:16:23 +0100
Subject: [PATCH] Also reject names with \ in the name

fixes issues #435 and #437
---
 apps/files/js/files.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index bb80841055..b8972bed6b 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -505,8 +505,8 @@ $(document).ready(function() {
 		$(this).append(input);
 		input.focus();
 		input.change(function(){
-			if(type != 'web' && $(this).val().indexOf('/')!=-1){
-				$('#notification').text(t('files','Invalid name, \'/\' is not allowed.'));
+			if(type != 'web' && ($(this).val().indexOf('/')!=-1 || $(this).val().indexOf('\\')!=-1)) {
+				$('#notification').text(t('files', 'Invalid name, \'/\' or \'\\\' is not allowed.'));
 				$('#notification').fadeIn();
 				return;
 			}
-- 
GitLab