mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-12 17:59:06 +02:00
Return status.InvalidArgument so malformed domain input produces a 4xx response
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
cubic-dev-ai[bot]
parent
db4f309a77
commit
f60bf51b81
@@ -364,7 +364,7 @@ func (m Manager) ValidateServiceDomain(ctx context.Context, tx nbstore.Store, ac
|
||||
}
|
||||
name, err := nbdomain.FromString(serviceDomain)
|
||||
if err != nil {
|
||||
return fmt.Errorf("parse service domain: %w", err)
|
||||
return status.Errorf(status.InvalidArgument, "invalid service domain: %v", err)
|
||||
}
|
||||
customDomains, err := tx.LockCustomDomains(ctx, accountID, name)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user