diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-11-02 16:22:37 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-11-23 09:19:49 +0100 |
commit | 662e3240b098b8cb1e5b618ed4e16c1aa52e11a4 (patch) | |
tree | c6a8342d28afd0197674db49d9f44779d185af8f /apps/user_ldap/lib/Migration | |
parent | 129de6079e53e0ac9dbf9d7c25ec1670ae0ff572 (diff) | |
download | nextcloud-server-662e3240b098b8cb1e5b618ed4e16c1aa52e11a4.tar.gz nextcloud-server-662e3240b098b8cb1e5b618ed4e16c1aa52e11a4.zip |
Support LDAP dns longer than 255 characters
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>
Diffstat (limited to 'apps/user_ldap/lib/Migration')
-rw-r--r-- | apps/user_ldap/lib/Migration/Version1010Date20200630192842.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php index e2c78ed59f8..9f0faf752a3 100644 --- a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php +++ b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php @@ -47,7 +47,12 @@ class Version1010Date20200630192842 extends SimpleMigrationStep { $table = $schema->createTable('ldap_user_mapping'); $table->addColumn('ldap_dn', Types::STRING, [ 'notnull' => true, - 'length' => 255, + 'length' => 64, + 'default' => '', + ]); + $table->addColumn('ldap_full_dn', Types::STRING, [ + 'notnull' => true, + 'length' => 4096, 'default' => '', ]); $table->addColumn('owncloud_name', Types::STRING, [ @@ -68,7 +73,12 @@ class Version1010Date20200630192842 extends SimpleMigrationStep { $table = $schema->createTable('ldap_group_mapping'); $table->addColumn('ldap_dn', Types::STRING, [ 'notnull' => true, - 'length' => 255, + 'length' => 64, + 'default' => '', + ]); + $table->addColumn('ldap_full_dn', Types::STRING, [ + 'notnull' => true, + 'length' => 4096, 'default' => '', ]); $table->addColumn('owncloud_name', Types::STRING, [ |