Removed some unnecessary changes, turned out it was a simple cache issue.

This fixes #2699
This fixes #2635
This commit is contained in:
Kenneth Skovhede
2018-02-08 09:03:51 +01:00
parent 9a41cf2867
commit d16c0f24ec
@@ -51,9 +51,6 @@ namespace Duplicati.Server.WebServer
{
string xsrftoken = request.Headers[XSRF_HEADER_NAME] ?? "";
if (!string.IsNullOrWhiteSpace(xsrftoken))
xsrftoken = Duplicati.Library.Utility.Uri.UrlDecode(xsrftoken);
if (string.IsNullOrWhiteSpace(xsrftoken))
{
var xsrfq = request.Form[XSRF_HEADER_NAME] ?? request.Form[Duplicati.Library.Utility.Uri.UrlEncode(XSRF_HEADER_NAME)];
@@ -77,8 +74,7 @@ namespace Duplicati.Server.WebServer
var buf = new byte[32];
var expires = DateTime.UtcNow.AddMinutes(XSRF_TIMEOUT_MINUTES);
m_prng.GetBytes(buf);
// Don't use non-safe chars, as the current webserver has some "trouble" parsing it
var token = BitConverter.ToString(buf).Replace("-", string.Empty); //Convert.ToBase64String(buf);
var token = Convert.ToBase64String(buf);
m_activexsrf.AddOrUpdate(token, key => expires, (key, existingExpires) =>
{