mirror of
https://github.com/lldap/lldap.git
synced 2026-03-31 15:07:48 +01:00
server, app: Add validation for attribute names (#1075)
This commit adds support for basic validation of attribute names at creation, and also in the schema overview. Both user and group attributes are validated with the same rules. For now, attribute names will be considered valid, if they only contain alphanumeric characters and dashes. Validation has been added the following places: - In graphql API, for creation of both user and group attributes. Request will be rejected, if attribute name is invalid. - In frontend, before submitting a request to create a new user or group attribute. Rejection here will show an error message including a list of the invalid characters used. As this change adds stricter validation to attributes, and, since the rationale for this is partly compatibility with other LDAP systems, this change also adds a warning in the schema overviews to any attribute using invalid characters.
This commit is contained in:
committed by
GitHub
parent
31a0cf5a4f
commit
f5fbb31e6e
Generated
+6
@@ -2536,6 +2536,7 @@ dependencies = [
|
||||
"ldap3_proto",
|
||||
"lettre",
|
||||
"lldap_auth",
|
||||
"lldap_validation",
|
||||
"log",
|
||||
"mockall",
|
||||
"nix",
|
||||
@@ -2589,6 +2590,7 @@ dependencies = [
|
||||
"indexmap 1.6.2",
|
||||
"jwt 0.13.0",
|
||||
"lldap_auth",
|
||||
"lldap_validation",
|
||||
"rand 0.8.5",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -2653,6 +2655,10 @@ dependencies = [
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lldap_validation"
|
||||
version = "0.6.0"
|
||||
|
||||
[[package]]
|
||||
name = "local-channel"
|
||||
version = "0.1.5"
|
||||
|
||||
Reference in New Issue
Block a user