Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
veniware committed Jan 22, 2024
1 parent 6371f54 commit 232b8f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Protest/Http/Auth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public static string GrandAccess(HttpListenerContext ctx, string username) {
#endif

Session newSession = new Session() {
access = acl.TryGetValue(username, out AccessControl value) ? value : default!,
access = acl.TryGetValue(username, out AccessControl value) ? value : default(AccessControl)!,
ip = ctx.Request.RemoteEndPoint.Address,
sessionId = sessionId,
loginDate = DateTime.UtcNow.Ticks,
Expand Down
3 changes: 1 addition & 2 deletions Protest/Tools/SmtpProfiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ public static byte[] Save(HttpListenerContext ctx) {
Profile[] newProfiles = JsonSerializer.Deserialize<Profile[]>(payload, smtpProfileSerializerOptionsWithPasswords);

for (int i = 0; i < newProfiles.Length; i++) {
if (newProfiles[i].guid == default) {

if (newProfiles[i].guid == default(Guid)) {
newProfiles[i].guid = Guid.NewGuid();
}

Expand Down

0 comments on commit 232b8f9

Please sign in to comment.