diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index a5550dc9926223afa058f435a84d92169439032b..5674206632b2daf1bf86cab8d2184b662cb9eb31 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -151,6 +151,9 @@ var FileList={
 			event.stopPropagation();
 			event.preventDefault();
 			var newname=input.val();
+			if (Files.containsInvalidCharacters(newname)) {
+				return false;
+			}
 			if (newname != name) {
 				if (FileList.checkName(name, newname, false)) {
 					newname = name;
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 2b250e0c7c5df20216bcf7da5d3bc0b2e50953da..28d4b49670d8d0771d0c760495a4c1dc31f4b1f2 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -25,6 +25,18 @@ Files={
 			delete uploadingFiles[index];
 		});
 		procesSelection();
+	},
+	containsInvalidCharacters:function (name) {
+		var invalid_characters = ['\\', '/', '<', '>', ':', '"', '|', '?', '*'];
+		for (var i = 0; i < invalid_characters.length; i++) {
+			if (name.indexOf(invalid_characters[i]) != -1) {
+				$('#notification').text(t('files', "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed."));
+				$('#notification').fadeIn();
+				return true;
+			}
+		}
+		$('#notification').fadeOut();
+		return false;
 	}
 };
 $(document).ready(function() {
@@ -505,9 +517,7 @@ $(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.'));
-				$('#notification').fadeIn();
+			if (type != 'web' && Files.containsInvalidCharacters($(this).val())) {
 				return;
 			} else if( type == 'folder' && $('#dir').val() == '/' && $(this).val() == 'Shared') {
 				$('#notification').text(t('files','Invalid folder name. Usage of "Shared" is reserved by Owncloud'));