public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Alexander Abraham <a.abraham@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-common] fix #5034: Updated the schema for the Email attribute to include a dash
Date: Tue, 29 Apr 2025 17:41:14 +0200	[thread overview]
Message-ID: <20250429154114.141571-1-a.abraham@proxmox.com> (raw)

This patch fixes bug #5034. A user was having the problem of
attempting to login to PVE with an LDAP server that had a different
mail attribute ID configured. The schema of PVE's LDAP attribute ID
validation didn't accept an extra hyphen in the attribute ID. 
This has now been fixed. I was unable to test this with an 
Open LDAP server.

Signed-off-by: Alexander Abraham <a.abraham@proxmox.com>
---
 src/PVE/JSONSchema.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm
index 7c63af1..ed1fb68 100644
--- a/src/PVE/JSONSchema.pm
+++ b/src/PVE/JSONSchema.pm
@@ -415,7 +415,7 @@ PVE::JSONSchema::register_format('ldap-simple-attr', \&verify_ldap_simple_attr);
 sub verify_ldap_simple_attr {
     my ($attr, $noerr) = @_;
 
-    if ($attr =~ m/^[a-zA-Z0-9]+$/) {
+    if ($attr =~ m/^[a-zA-Z0-9\-]+$/) {
 	return $attr;
     }
 
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


             reply	other threads:[~2025-04-29 15:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29 15:41 Alexander Abraham [this message]
2025-05-26  8:22 ` Alexander Abraham

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=20250429154114.141571-1-a.abraham@proxmox.com \
    --to=a.abraham@proxmox.com \
    --cc=pve-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal