-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
user_ldap fix ldap connection resets #31421
Conversation
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>
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.
looks good in general, please check the one comment about suspicious code removal
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.
👍
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.
one concern
@@ -1183,7 +1147,7 @@ private function processPagedSearchStatus( | |||
bool $pagedSearchOK, | |||
bool $skipHandling | |||
): bool { | |||
$cookie = null; | |||
$cookie = ''; |
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.
I think we have to resort to null here for behaviour of LDAP servers, cf. comment on line 1175ff – null and empty string may have different meanings.
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.
controlPagedResultResponse
is forcing $cookie to be a string.
null cookies are turned into empty string here: https://github.com/nextcloud/server/blob/master/apps/user_ldap/lib/PagedResults/Php73.php#L81
[stable23] user_ldap fix ldap connection resets #31421
[stable22] user_ldap fix ldap connection resets #31421
First commit is a patch sent to a customer to fix a problem where LDAP connection was reseted during executeRead, and because the connection resource var was not managed consistently the get first entry would fail.
Patch was tested and approved by customer.
The second commit is a clean up of typing.