From bc1e9ef6625f336d72f9e322297ad37c68667fbe Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 8 May 2014 10:24:49 +0200 Subject: [PATCH] Fixing # char in session token. --- src/libnpsharp/Authentication/AuthenticationHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)