[stable20] Support LDAP dns longer than 255 characters#30269
[stable20] Support LDAP dns longer than 255 characters#30269
Conversation
Adds an ldap_full_dn column to store the dn, and only store a sha256 hash in the ldap_dn which is shorter and can be indexed without trouble. Migration still needs to be implemented. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
We cannot set ldap_dn_hash column as notnull because it is empty for existing users before postSchemaChange is called Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This is to ensure new installations do not need to go through migration history. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
The documentation says it can return false, and even if that is highly unlikely for sha256, better safe than sorry. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
|
Failure seems related. LDAP query is too big |
|
Thank you for the information. So after a bit more investigation: I am not sure how to avoid this, whether this test makes sense, and especially why this is only failing on mysql5.6. |
|
MySQL 5.6 has a lower default value for the https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_max_allowed_packet 4194304 Decreasing the chunking in server/apps/user_ldap/lib/Mapping/AbstractMapping.php Lines 232 to 241 in 5a2b7fb |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Backport #29523