From 4e2e7fd6383d1f0e9a775e1c810555270b0303c0 Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Thu, 10 May 2018 14:31:26 +0200 Subject: [PATCH] ldap: Fix attribute max size The equation was wrong.. exceeding means > not >= --- lib/SimpleSAML/Auth/LDAP.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/SimpleSAML/Auth/LDAP.php b/lib/SimpleSAML/Auth/LDAP.php index 6f36104d8..f5d47f5fe 100644 --- a/lib/SimpleSAML/Auth/LDAP.php +++ b/lib/SimpleSAML/Auth/LDAP.php @@ -582,10 +582,10 @@ class SimpleSAML_Auth_LDAP for ($j = 0; $j < $attribute['count']; $j++) { $value = $attribute[$j]; - if (!empty($maxsize) && strlen($value) >= $maxsize) { + if (!empty($maxsize) && strlen($value) > $maxsize) { // Ignoring and warning SimpleSAML\Logger::warning('Library - LDAP getAttributes(): Attribute \''. - $name.'\' exceeded maximum allowed size by ' +($maxsize - strlen($value))); + $name.'\' exceeded maximum allowed size by '.(strlen($value) - $maxsize)); continue; } -- GitLab