diff --git a/lang/main-de.json b/lang/main-de.json index 129c45376..3859581f7 100644 --- a/lang/main-de.json +++ b/lang/main-de.json @@ -126,6 +126,8 @@ "mutedTitle": "Stummschaltung aktiv." }, "dialog": { + "illCharInRoomNameMessage": "Ungültiges Zeichen im Raumnamen", + "roomNameHint": "Ein gültiger Raumname besteht aus Buchstaben, Ziffern, + Zeichen und = Zeichen.", "kickMessage": "Oh! Sie wurden aus der Konferenz ausgeschlossen.", "popupError": "Ihr Browser blockiert Popup-Fenster von dieser Webseite. Bitte erlauben Sie dieser Seite Popups in den Sicherheitseinstellungen Ihres Browsers und versuchen Sie es erneut.", "passwordError": "Diese Konferenz ist mit einem Paswort geschützt. Nur der Besitzer der Konferenz kann ein Passwort vergeben.", @@ -241,4 +243,4 @@ "pending": "Die Aufzeichnung wird gestartet sobald ein weiterer Teilnehmer beitritt", "on": "Aufzeichnung wurde gestartet" } -} \ No newline at end of file +} diff --git a/lang/main.json b/lang/main.json index 6b5ff4960..94db5be83 100644 --- a/lang/main.json +++ b/lang/main.json @@ -130,7 +130,9 @@ "mutedTitle": "You're muted!" }, "dialog": { - "kickMessage": "Ouch! You have been kicked out of the meet!", + "illCharInRoomNameMessage": "Illegal Character in Room Name", + "roomNameHint": "A valid room name may contain only letters, digits, + signs and = -characters.", + "kickMessage": "Ouch ! You have been kicked out of the meet!", "popupError": "Your browser is blocking popup windows from this site. Please enable popups in your browser's security settings and try again.", "passwordError": "This conversation is currently protected by a password. Only the owner of the conference can set a password.", "passwordError2": "This conversation isn't currently protected by a password. Only the owner of the conference can set a password.", diff --git a/modules/UI/authentication/LoginDialog.js b/modules/UI/authentication/LoginDialog.js index 50dff3d3b..9b1673ab8 100644 --- a/modules/UI/authentication/LoginDialog.js +++ b/modules/UI/authentication/LoginDialog.js @@ -56,7 +56,8 @@ function Dialog(callback, obtainSession) { var password = f.password; if (jid && password) { stop = false; - //++__authdomain__ complete jid by appending @ if no @ was found in jid + //++__authdomain__ complete jid by appending @ + //if no @ was found in jid if (jid.indexOf("@") < 0) { jid = jid.concat('@'); if (config.hosts.authdomain) { diff --git a/modules/UI/welcome_page/WelcomePage.js b/modules/UI/welcome_page/WelcomePage.js index 3a7b9692d..2cd14c04a 100644 --- a/modules/UI/welcome_page/WelcomePage.js +++ b/modules/UI/welcome_page/WelcomePage.js @@ -2,14 +2,25 @@ var animateTimeout, updateTimeout; var RoomNameGenerator = require("./RoomnameGenerator"); +var messageHandler = require("../util/MessageHandler"); function enter_room() { var val = $("#enter_room_field").val(); if(!val) { - val = $("#enter_room_field").attr("room_name"); + val = $("#enter_room_field").attr("room_name"); } if (val) { + // also ÄÖÜäöüß - requiers further changes + // (nginx - sites-enabled (location .. rewrite), other js-modules + // var validRoomNamePattern = + // /^[a-zA-Z0-9=\?\+\u00c4\u00e4\u00d6\u00f6\u00dc\u00fc\u00df\ ]+$/; + var validRoomNamePattern = /^[a-zA-Z0-9=\?\+]+$/; + if (val.match(validRoomNamePattern) !== null) { window.location.pathname = "/" + val; + } else { + messageHandler.openMessageDialog ( + "dialog.illCharInRoomNameMessage", "dialog.roomNameHint"); + } } } @@ -93,4 +104,4 @@ function setupWelcomePage() { } -module.exports = setupWelcomePage; \ No newline at end of file +module.exports = setupWelcomePage;