mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-07-09 09:26:46 +00:00
api-types: ldap: properly anchor DN regex
Otherwise, a substring match is enough to fulfill the constraint.
Fixes: c001aca0
("api-types: ldap: add verification regex for LDAP DNs")
Reported-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
This commit is contained in:
parent
3da94f2e74
commit
072b0e9cf9
@ -150,11 +150,11 @@ macro_rules! DOMAIN_PART_REGEX {
|
||||
|
||||
const_regex! {
|
||||
pub LDAP_DOMAIN_REGEX = concat!(
|
||||
r#"\w+="#,
|
||||
r#"^\w+="#,
|
||||
DOMAIN_PART_REGEX!(),
|
||||
r#"(,\s*\w+="#,
|
||||
DOMAIN_PART_REGEX!(),
|
||||
")*"
|
||||
")*$"
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user