-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Support LDAP dns longer than 255 characters #29523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Note to self: we should look into which kind of hash fits the best what we need here. There are uuid v5, and other hash algorithm, unicity and performance should be compared to select the best fit. |
|
Related bug ticket: #2213 |
|
/rebase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the first Migration class, the final state of the table should be reflected for new installations. Not necessary to run the while migration history on a new install. So you can add the columns and alter the index in Version1010Date20200630192842.
The new Version1130Date20211102154716 is of course required and looks good as is, with the one remark I left there.
|
@nickvergessen what do you think about its backportability? |
|
…while at changing DB it might be worth to add a simple index on directory_uuid, too, since this also may be used as sole WHERE column in queries. |
Done in bb6906d |
Done in c1ff024 |
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>
fd43e4e to
a359047
Compare
| @@ -0,0 +1,146 @@ | |||
| <?php | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright
|
/backport to stable23 |
|
/backport to stable22 |
|
/backport to stable21 |
|
/backport to stable20 |
|
Sorry for remembering that 2 minutes too late, but I think this is missing a version bump. Otherwise the migration won't run in our development instances. |
|
The backport to stable20 failed. Please do this backport manually. |
|
The backport to stable22 failed. Please do this backport manually. |
|
The backport to stable23 failed. Please do this backport manually. |
|
The backport to stable21 failed. Please do this backport manually. |
|
@come-nc please do the backports manually :( |
Adds an
ldap_full_dncolumn to store the dn, and only store a sha256 hash in theldap_dnwhich is shorter and can be indexed without trouble.Migration still needs to be implemented.
Signed-off-by: Côme Chilliet come.chilliet@nextcloud.com