mirror of
https://github.com/bitwarden/server
synced 2025-12-24 04:03:25 +00:00
Protect user registration with captcha (#1480)
* Protect user registration with captcha * PR feedback
This commit is contained in:
@@ -9,7 +9,7 @@ using Newtonsoft.Json;
|
||||
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class RegisterRequestModel : IValidatableObject
|
||||
public class RegisterRequestModel : IValidatableObject, ICaptchaProtectedModel
|
||||
{
|
||||
[StringLength(50)]
|
||||
public string Name { get; set; }
|
||||
@@ -22,6 +22,7 @@ namespace Bit.Core.Models.Api
|
||||
public string MasterPasswordHash { get; set; }
|
||||
[StringLength(50)]
|
||||
public string MasterPasswordHint { get; set; }
|
||||
public string CaptchaResponse { get; set; }
|
||||
public string Key { get; set; }
|
||||
public KeysRequestModel Keys { get; set; }
|
||||
public string Token { get; set; }
|
||||
|
||||
7
src/Core/Models/Api/Request/ICaptchaProtectedModel.cs
Normal file
7
src/Core/Models/Api/Request/ICaptchaProtectedModel.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public interface ICaptchaProtectedModel
|
||||
{
|
||||
string CaptchaResponse { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user