mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
[PM-2740] Add null check on base64-encoded values on knowndevice query (#3586)
* Added null check on header-based knowndevice call to match query-string implementation. * Updated to use model binding instead of individual inputs. * Linting.
This commit is contained in:
16
src/Api/Models/Request/KnownDeviceRequestModel.cs
Normal file
16
src/Api/Models/Request/KnownDeviceRequestModel.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Api.Models.Request;
|
||||
|
||||
public class KnownDeviceRequestModel
|
||||
{
|
||||
[Required]
|
||||
[FromHeader(Name = "X-Request-Email")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required]
|
||||
[FromHeader(Name = "X-Device-Identifier")]
|
||||
public string DeviceIdentifier { get; set; }
|
||||
|
||||
}
|
Reference in New Issue
Block a user