Skip to content
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

[stable22] ensure that user and group IDs in LDAP's tables are also max 64chars #28968

Merged
merged 1 commit into from
Sep 30, 2021

Conversation

backportbot-nextcloud[bot]
Copy link

@backportbot-nextcloud backportbot-nextcloud bot commented Sep 27, 2021

⚠️ This backport had conflicts and is incomplete ⚠️ ✔️

backport of #28876

@blizzz blizzz added the 3. to review Waiting for reviews label Sep 27, 2021
@blizzz blizzz modified the milestones: Nextcloud 22.1.2, Nextcloud 22.2.0 Sep 27, 2021
$u->setParameter('uuid', $row['directory_uuid']);
$u->setParameter('newId', $newId);
try {
$u->executeStatement();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume the cursor will operate on the old result set and won't lock the pending updates, hope this works with all DBMS ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why should it not? separate queries, separate cursors.

@PVince81
Copy link
Member

this looks scary, will this mess up any mappings ? is "owncloud_name" the same as user id ?

for example if we have a user in a channel in Talk by the old user id, will that user still be recognized properly after the migration ?

@blizzz blizzz mentioned this pull request Sep 29, 2021
1 task
@blizzz
Copy link
Member

blizzz commented Sep 29, 2021

this looks scary, will this mess up any mappings ? is "owncloud_name" the same as user id ?

yes, the owncloud_name column – historically bad name – holds the user id.

And yes, the user id was shortened, but since it was too long, Nextcloud would not have been operational for users with too long user ids, i.e. login would trigger a 500, direct sharing would equally fail. Shortening the values is necessary for shrinking the column. It is a rare corner case.

Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- limitation by core tables (e.g. sharing), IDs are always 64chars
- when longer group IDs were requested they are hashed (does not affect
  displaynames)

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@PVince81 PVince81 force-pushed the backport/28876/stable22 branch from 7902520 to 8586d60 Compare September 29, 2021 12:17
@PVince81
Copy link
Member

I've solved the conflict on the version number

@MichaIng MichaIng merged commit 8fdae48 into stable22 Sep 30, 2021
@MichaIng MichaIng deleted the backport/28876/stable22 branch September 30, 2021 11:24
@blizzz blizzz mentioned this pull request Nov 3, 2021
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants