Skip to content

[stable26] Fix: Escape group names for LDAP - #40740

Merged
blizzz merged 1 commit into
nextcloud:stable26from
AaronDewes:stable26
Oct 9, 2023
Merged

[stable26] Fix: Escape group names for LDAP#40740
blizzz merged 1 commit into
nextcloud:stable26from
AaronDewes:stable26

Conversation

@AaronDewes

Copy link
Copy Markdown
Contributor

Backport of #37201.

@solracsfsolracsf added the 3. to review Waiting for reviews label Oct 2, 2023
@solracsfsolracsf added this to the Nextcloud 26.0.8 milestone Oct 2, 2023
$base = $this->configuration->ldapBase[0];
foreach ($cns as $cn) {
$rr = $this->ldap->search($cr, $base, 'cn=' . $cn, ['dn', 'primaryGroupToken']);
$rr = $this->ldap->search($cr, $base, 'cn=' . ldap_escape($cn, '', LDAP_ESCAPE_FILTER), ['dn', 'primaryGroupToken']);

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 2 of OCA\User_LDAP\ILDAPWrapper::search cannot be null, possibly null value provided
@solracsfsolracsf added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Oct 3, 2023
@blizzzblizzz mentioned this pull request Oct 9, 2023
@blizzz
blizzz merged commit 9619565 into nextcloud:stable26Oct 9, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishfeature: ldap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@AaronDewes@artonge@github-advanced-security@come-nc@blizzz@solracsf