1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-18 01:55:37 -05:00

Updated Braintree ID string validation to account for providers (#5794)

This commit is contained in:
Conner Turnbull 2025-05-15 09:42:01 -04:00 committed by GitHub
parent a973a11d90
commit 9e2562fc8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,7 +17,7 @@ public class ChargeBraintreeModel : IValidatableObject
{ {
if (Id != null) if (Id != null)
{ {
if (Id.Length != 36 || (Id[0] != 'o' && Id[0] != 'u') || if (Id.Length != 36 || (Id[0] != 'o' && Id[0] != 'u' && Id[0] != 'p') ||
!Guid.TryParse(Id.Substring(1, 32), out var guid)) !Guid.TryParse(Id.Substring(1, 32), out var guid))
{ {
yield return new ValidationResult("Customer Id is not a valid format."); yield return new ValidationResult("Customer Id is not a valid format.");