Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
Sanitize possibly malicious email inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
hhvrc committed Feb 16, 2023
1 parent 041efa1 commit d8447ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/Controllers/Api/V1/Account/_Models/RecoveryRequest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Text.Json.Serialization;
using ZapMe.Attributes;

namespace ZapMe.Controllers.Api.V1.Account.Models;

Expand All @@ -10,6 +11,7 @@ public struct RecoveryRequest
/// <summary>
/// Email of your account you want to recover
/// </summary>
[EmailAddress(true)]
[JsonPropertyName("email")]
public string Email { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions backend/Controllers/Api/V1/Config/_Models/EmailConfig.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
using System.Text.Json.Serialization;
using ZapMe.Attributes;

namespace ZapMe.Controllers.Api.V1.Config.Models;

public struct Emailconfig
{
[EmailAddress(true)]
[JsonPropertyName("support")]
public string EmailSupport { get; set; }

[EmailAddress(true)]
[JsonPropertyName("contact")]
public string EmailContact { get; set; }
}

0 comments on commit d8447ee

Please sign in to comment.