[X2Go-Commits] [x2goserver] 01/01: Allow email addresses as login usernames. (Fixes: #573).

git-admin at x2go.org git-admin at x2go.org
Mon Aug 18 14:30:04 CEST 2014


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch release/4.0.1.x
in repository x2goserver.

commit fc10d213b66acce0dbfb42047e80970f0839725d
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Aug 18 14:25:11 2014 +0200

    Allow email addresses as login usernames. (Fixes: #573).
    
    Conflicts (resolved by Mike Gabriel):
    	X2Go/Utils.pm -> x2goserver/lib/x2goutils.pm
---
 debian/changelog              |    1 +
 x2goserver/bin/x2gostartagent |    2 +-
 x2goserver/lib/x2goutils.pm   |    6 +++---
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index fc51359..1996fe4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -64,6 +64,7 @@ x2goserver (4.0.1.16-0x2go1) UNRELEASED; urgency=low
       with an error.
     - Silently timeout in x2golistdesktops if calls to x2golistsessions and/or
       xwininfo don't produce output within one second. (Fixes: #543).
+    - Allow email addresses as login usernames. (Fixes: #573).
   * debian/control, x2goserver.spec:
     + Update versioned D: x2goagent (>= 3.5.0.25). This assures that X2Go
       works with poly-instantiated /tmp directories.
diff --git a/x2goserver/bin/x2gostartagent b/x2goserver/bin/x2gostartagent
index f9bd600..94d761b 100755
--- a/x2goserver/bin/x2gostartagent
+++ b/x2goserver/bin/x2gostartagent
@@ -169,7 +169,7 @@ while [ "$OUTPUT"  != "inserted" ]; do
 			SESSION_NAME=`echo "$SESSION_NAME" | perl -pe  "s/:/PP/g"`
 		fi
 		# sanitize session name
-		SESSION_NAME=`echo "$SESSION_NAME" | perl -pe  "s/[^a-zA-Z0-9\.\_\-]//g"`
+		SESSION_NAME=`echo "$SESSION_NAME" | perl -pe  "s/[^a-zA-Z0-9\.\_\-\@]//g"`
 
 		OUTPUT=`$X2GO_LIB_PATH/x2goinsertsession "$X2GO_PORT" "$HOSTNAME" "$SESSION_NAME"`
 	fi 
diff --git a/x2goserver/lib/x2goutils.pm b/x2goserver/lib/x2goutils.pm
index cb0a32a..b2f5072 100644
--- a/x2goserver/lib/x2goutils.pm
+++ b/x2goserver/lib/x2goutils.pm
@@ -46,10 +46,10 @@ sub sanitizer {
 			return $string;
 		} else {return 0;}
 	} elsif ($type eq "x2gosid") {
-		$string =~ s/[^a-zA-Z0-9\_\-\$\.]//g;
-		if ($string =~ /^([a-zA-Z0-9\_\-\$\.]*)$/) {
+		$string =~ s/[^a-zA-Z0-9\_\-\$\.\@]//g;
+		if ($string =~ /^([a-zA-Z0-9\_\-\$\.\@]*)$/) {
 			$string = $1;
-			if ($string =~ /^([a-zA-Z\_][a-zA-Z0-9\_\-\.]{0,31}[\$]?)\-([\d]{2,4})\-([\d]{9,12})\_[a-zA-Z0-9\_\-]*\_dp[\d]{1,2}$/) {
+			if ($string =~ /^([a-zA-Z\_][a-zA-Z0-9\_\-\.\@]{0,31}[\$]?)\-([\d]{2,4})\-([\d]{9,12})\_[a-zA-Z0-9\_\-]*\_dp[\d]{1,2}$/) {
 				if ((length($1) > 0) and (length($1) < 32)){
 					return $string;
 				} else {return 0;}

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git


More information about the x2go-commits mailing list