public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH access-control] fix #5136: ldap: Decode non-ASCII characters in attributes
@ 2023-12-20 14:37 Filip Schauer
  2023-12-21  9:42 ` Lukas Wagner
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Filip Schauer @ 2023-12-20 14:37 UTC (permalink / raw)
  To: pve-devel

Decode non-ASCII character when syncing user attributes, since those
will be encoded later on. Without this fix the attributes where encoded
twice, resulting in cases such as 'ü' turning into 'ü'.

Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
---
 src/PVE/Auth/LDAP.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/Auth/LDAP.pm b/src/PVE/Auth/LDAP.pm
index b958f2b..5e7a30c 100755
--- a/src/PVE/Auth/LDAP.pm
+++ b/src/PVE/Auth/LDAP.pm
@@ -301,7 +301,7 @@ sub get_users {
 
 	foreach my $attr (keys %$user_attributes) {
 	    if (my $ours = $ldap_attribute_map->{$attr}) {
-		$ret->{$username}->{$ours} = $user_attributes->{$attr}->[0];
+		$ret->{$username}->{$ours} = PVE::Tools::decode_text($user_attributes->{$attr}->[0]);
 	    }
 	}
 
-- 
2.39.2





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-09 13:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-20 14:37 [pve-devel] [PATCH access-control] fix #5136: ldap: Decode non-ASCII characters in attributes Filip Schauer
2023-12-21  9:42 ` Lukas Wagner
2023-12-21  9:46 ` Christoph Heiss
2023-12-21 10:03 ` Lukas Wagner
2024-01-08  9:26 ` Wolfgang Bumiller
2024-01-09 13:36   ` Filip Schauer

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