fix(auth): allow LDAP sign-in with special characters (#10798) (#10857)

# Which Problems Are Solved
- Users were unable to sign in via LDAP when their password contained
special characters (%, #, &), because URI validation rejected valid
credentials #10798
- This occurs specifically when using a custom login implementation for
LDAP authentication during the LDAP user intent flow.

# How the Problems Are Solved
Removed the URI validation from LDAP password handling, allowing all
special characters.

# Additional Changes
- Applied changes in v2 and v2beta LDAP flows.
- Verified other authentication flows remain unaffected.

# Additional Context
- Closes #10798
This commit is contained in:
Surya
2025-10-24 14:59:05 +05:30
committed by GitHub
parent 8693de8170
commit 785512ea8b
3 changed files with 3 additions and 3 deletions

View File

@@ -416,7 +416,7 @@ message LDAPCredentials {
]; ];
// Password used to login through LDAP. // Password used to login through LDAP.
string password = 2 [ string password = 2 [
(validate.rules).string = {min_len: 1, max_len: 200, uri_ref: true}, (validate.rules).string = {min_len: 1, max_len: 200},
(google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
min_length: 1; min_length: 1;

View File

@@ -20,7 +20,7 @@ message LDAPCredentials {
} }
]; ];
string password = 2[ string password = 2[
(validate.rules).string = {min_len: 1, max_len: 200, uri_ref: true}, (validate.rules).string = {min_len: 1, max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Password used to login through LDAP" description: "Password used to login through LDAP"
min_length: 1; min_length: 1;

View File

@@ -20,7 +20,7 @@ message LDAPCredentials {
} }
]; ];
string password = 2[ string password = 2[
(validate.rules).string = {min_len: 1, max_len: 200, uri_ref: true}, (validate.rules).string = {min_len: 1, max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Password used to login through LDAP" description: "Password used to login through LDAP"
min_length: 1; min_length: 1;