From: Lukas Wagner <l.wagner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] api-types: ldap: properly anchor DN regex
Date: Wed, 29 Mar 2023 11:22:41 +0200 [thread overview]
Message-ID: <20230329092241.277970-1-l.wagner@proxmox.com> (raw)
Otherwise, a substring match is enough to fulfill the constraint.
Reported-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
pbs-api-types/src/ldap.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pbs-api-types/src/ldap.rs b/pbs-api-types/src/ldap.rs
index eabc5249..762f560a 100644
--- a/pbs-api-types/src/ldap.rs
+++ b/pbs-api-types/src/ldap.rs
@@ -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!(),
- ")*"
+ ")*$"
);
}
--
2.30.2
next reply other threads:[~2023-03-29 9:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 9:22 Lukas Wagner [this message]
2023-03-29 9:29 ` [pbs-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230329092241.277970-1-l.wagner@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox