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

Fixes bin2hex() in LDAP #7479

Merged
merged 1 commit into from
Dec 13, 2017
Merged

Fixes bin2hex() in LDAP #7479

merged 1 commit into from
Dec 13, 2017

Conversation

MorrisJobke
Copy link
Member

Untangles the two if-else clauses into a more readable format.

Fixes #7400

Untangles the two if-else clauses into a more readable format.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@MorrisJobke MorrisJobke added this to the Nextcloud 13 milestone Dec 13, 2017
This was referenced Dec 13, 2017
@MorrisJobke
Copy link
Member Author

The proof on 3v4l: https://3v4l.org/OdXp2

if($this->resemblesDN($key)) {
$selection[$i][$key] = $this->helper->sanitizeDN($item[$key]);
} else if($key === 'objectguid' || $key === 'guid') {
$selection[$i][$key] = [$this->convertObjectGUID2Str($item[$key][0])];
Copy link
Member

Choose a reason for hiding this comment

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

I'm assuming just taking the first element is fine?

Copy link
Member Author

Choose a reason for hiding this comment

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

cc @blizzz

Copy link
Member

Choose a reason for hiding this comment

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

yes, because it is an identifier. if i get my hands on an AD i wanna doublecheck the format, however, and ideally add tests for it

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

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

Ok lets do this. @blizzz please do take a look at my comment since this part of ldap is dark magic to me.

@MorrisJobke MorrisJobke changed the title Fixes hex2bin() in LDAP Fixes bin2hex() in LDAP Dec 13, 2017
@MorrisJobke
Copy link
Member Author

As I only took the patch of @blizzz #7400 (comment) I also give this a 👍

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