diff --git a/src/libnpsharp/Authentication/AuthenticationHelper.cs b/src/libnpsharp/Authentication/AuthenticationHelper.cs index a7f3084..58b2427 100644 --- a/src/libnpsharp/Authentication/AuthenticationHelper.cs +++ b/src/libnpsharp/Authentication/AuthenticationHelper.cs @@ -77,7 +77,7 @@ namespace NPSharp.Authentication // Response will be in this syntax: // (ok|fail)#text#userid#username#email#sessiontoken - var rx = new Regex("^(?ok|fail)#(?.+)#(?[0-9]+)#(?.+)#(?.+)#(?.+)$"); + var rx = new Regex("^(?ok|fail)#(?.+)#(?[0-9]+)#(?.+)#(?.+)#(?[^#]+)[#]*$"); var resp = (HttpWebResponse)req.GetResponse (); using (var respStream = resp.GetResponseStream()) { if (respStream == null)