optimizations and bug fixes:
- Fixed directory cache bug in Fs - Optimized DmId creation - Optimized most splits
This commit is contained in:
parent
1e40db62a4
commit
ab89f07493
5 changed files with 117 additions and 110 deletions
|
|
@ -31,7 +31,7 @@ public class Requests
|
|||
return;
|
||||
}
|
||||
|
||||
string id = idQuery.ToString().Split(":")[0];
|
||||
string id = Utils.GetIdFromUsernameWD(idQuery.ToString());
|
||||
string password = await Utils.GetPassword(id);
|
||||
secret = await Utils.NonceDecryptBody(id, password, secret);
|
||||
string auth = await Utils.Auth(id, password, secret);
|
||||
|
|
@ -292,7 +292,7 @@ public class Requests
|
|||
return;
|
||||
}
|
||||
|
||||
string id = idQuery.ToString().Split(":")[0];
|
||||
string id = Utils.GetIdFromUsernameWD(idQuery.ToString());
|
||||
string password = await Utils.GetPassword(id);
|
||||
secret = await Utils.NonceDecryptBody(id, password, secret);
|
||||
string auth = await Utils.Auth(id, password, secret);
|
||||
|
|
@ -312,7 +312,7 @@ public class Requests
|
|||
{
|
||||
return;
|
||||
}
|
||||
username = username.ToString().Split(":")[0];
|
||||
username = Utils.GetIdFromUsernameWD(username.ToString());
|
||||
|
||||
await context.Response.WriteAsync(await Utils.NameFromId(await Utils.IdFromName(username)));
|
||||
return;
|
||||
|
|
@ -328,7 +328,7 @@ public class Requests
|
|||
|
||||
if (!Utils.IsUserLocal(username, out string domain)) //federation
|
||||
{
|
||||
username = username.ToString().Split(":")[0];
|
||||
username = Utils.GetIdFromUsernameWD(username.ToString());
|
||||
string remoteId = await Federation.Sender.GetUserId(username, domain);
|
||||
if (remoteId != "0" && !string.IsNullOrEmpty(remoteId))
|
||||
{
|
||||
|
|
@ -336,7 +336,7 @@ public class Requests
|
|||
}
|
||||
return;
|
||||
}
|
||||
username = username.ToString().Split(":")[0];
|
||||
username = Utils.GetIdFromUsernameWD(username.ToString());
|
||||
|
||||
await context.Response.WriteAsync(await Utils.IdFromName(username) + $":{DOMAIN}");
|
||||
return;
|
||||
|
|
@ -353,7 +353,7 @@ public class Requests
|
|||
{
|
||||
return;
|
||||
}
|
||||
id = id.ToString().Split(":")[0];
|
||||
id = Utils.GetIdFromUsernameWD(id.ToString());
|
||||
|
||||
await context.Response.WriteAsync(await Utils.NameFromId(id) + $":{DOMAIN}");
|
||||
return;
|
||||
|
|
@ -367,7 +367,7 @@ public class Requests
|
|||
return;
|
||||
}
|
||||
|
||||
string id = idQuery.ToString().Split(":")[0];
|
||||
string id = Utils.GetIdFromUsernameWD(idQuery.ToString());
|
||||
string plainPass = await Utils.GetPassword(id);
|
||||
foreach (var kvp in nonceHolder) //clearowanie nieuzytych nonce
|
||||
{
|
||||
|
|
@ -403,7 +403,7 @@ public class Requests
|
|||
return;
|
||||
}
|
||||
|
||||
string id = idQuery.ToString().Split(":")[0];
|
||||
string id = Utils.GetIdFromUsernameWD(idQuery.ToString());
|
||||
string body = await LoadBody(bodyReader);
|
||||
string password = await Utils.GetPassword(id);
|
||||
string newPass = await Utils.NonceDecryptBody(id, password, body, false);
|
||||
|
|
@ -451,7 +451,7 @@ public class Requests
|
|||
return;
|
||||
}
|
||||
|
||||
string id = idQuery.ToString().Split(":")[0];
|
||||
string id = Utils.GetIdFromUsernameWD(idQuery.ToString());
|
||||
string body = await LoadBody(bodyReader);
|
||||
string password = await Utils.GetPassword(id);
|
||||
|
||||
|
|
@ -503,7 +503,7 @@ public class Requests
|
|||
{
|
||||
return;
|
||||
}
|
||||
string id = idQuery.ToString().Split(":")[0];
|
||||
string id = Utils.GetIdFromUsernameWD(idQuery.ToString());
|
||||
string keysRaw = await Utils.GetUserKeys(id);
|
||||
if (string.IsNullOrEmpty(keysRaw))
|
||||
{
|
||||
|
|
@ -533,7 +533,7 @@ public class Requests
|
|||
{
|
||||
return;
|
||||
}
|
||||
string id = idQuery.ToString().Split(":")[0];
|
||||
string id = Utils.GetIdFromUsernameWD(idQuery.ToString());
|
||||
|
||||
byte[] entryByte = await Utils.GetUserPublicStorageEntry(id, entry);
|
||||
|
||||
|
|
@ -557,7 +557,7 @@ public class Requests
|
|||
return;
|
||||
}
|
||||
|
||||
string id = idQuery.ToString().Split(":")[0];
|
||||
string id = Utils.GetIdFromUsernameWD(idQuery.ToString());
|
||||
string body = await LoadBody(bodyReader);
|
||||
string password = await Utils.GetPassword(id);
|
||||
body = await Utils.NonceDecryptBody(id, password, body, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue