aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2014-11-28 10:50:59 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2014-11-28 10:50:59 +0100
commit0cd9dcae5a8b929f50a37423bb2771bdb0068f7c (patch)
tree34f5a30d628d50658e22806efeb4956c34e7a3d2
parent7f45435d2d32291f31d3c98b6d35c415b71e48f8 (diff)
downloadarctica-greeter-0cd9dcae5a8b929f50a37423bb2771bdb0068f7c.tar.gz
arctica-greeter-0cd9dcae5a8b929f50a37423bb2771bdb0068f7c.tar.bz2
arctica-greeter-0cd9dcae5a8b929f50a37423bb2771bdb0068f7c.zip
Allow UCCS logins that are not email addresses (but usernames).
-rw-r--r--debian/changelog1
-rw-r--r--src/user-list.vala2
2 files changed, 2 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 756b51c..c138d06 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ unity-greeter-x2go (14.04.10-0x2go1) UNRELEASED; urgency=medium
* First forked/upstream release (1.0.0.1):
- Apply patch 01_x2go+rls.patch. Natively support X2Go Session.
+ - Allow UCCS logins that are not email addresses (but usernames).
* debian/control:
+ Add to S: lightdm-remote-session-x2go.
+ Drop from S: lightdm-remote-session-uccsconfigure.
diff --git a/src/user-list.vala b/src/user-list.vala
index 86b71d2..7ebc41b 100644
--- a/src/user-list.vala
+++ b/src/user-list.vala
@@ -421,7 +421,7 @@ public class UserList : GreeterList
/* Check email address is valid
* Using the html5 definition of a valid e-mail address
* http://www.w3.org/TR/html5/states-of-the-type-attribute.html#valid-e-mail-address */
- var re = new Regex ("[a-zA-Z0-9.!#$%&'\\*\\+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*");
+ var re = new Regex ("[a-zA-Z0-9.!#$%&'\\*\\+/=?^_`{|}~-]+(|@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*)");
MatchInfo info;
email_valid = re.match_all (email, 0, out info);
email_valid = email_valid && info.get_match_count () > 0 && info.fetch (0) == email;