Skip to content

Prevent user with empty uid#6

Merged
DeepDiver1975 merged 1 commit into
masterfrom
preventemptyuid
Sep 30, 2016
Merged

Prevent user with empty uid#6
DeepDiver1975 merged 1 commit into
masterfrom
preventemptyuid

Conversation

@butonic

@butonic butonic commented Sep 29, 2016

Copy link
Copy Markdown
Contributor

The uid might be empty if the mapped owncloud_username, eg. mail is empty. While admins should make sure the attribute is always set the ldap admins are only human. Errors happen and we need to protect against user errer. In this case we should die hard, giving everyone a hint at what might be wrong, which is why I use assert(). It will throw an exception and prevent further desaster. As in overwriting the quota for all users ...

@CLAassistant

CLAassistant commented Sep 29, 2016

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@mention-bot

Copy link
Copy Markdown

@butonic, thanks for your PR! By analyzing the annotation information on this pull request, we identified @blizzz, @DeepDiver1975 and @VicDeo to be potential reviewers

@butonic

butonic commented Sep 29, 2016

Copy link
Copy Markdown
Contributor Author

@owncloud/ldap quick review

@jvillafanez

Copy link
Copy Markdown
Member

🚫

Assertions can be disabled, and we should assume they will disabled on production. Taking into account that the code depends on an external service (LDAP) whose configuration is completely unknown, we can't consider that the code will be "safe" to be run without assertions once it reach production.

Just checking and throwing the exception seems a better option.

@butonic

butonic commented Sep 30, 2016

Copy link
Copy Markdown
Contributor Author

@jvillafanez @DeepDiver1975 done, makes sense.

@jvillafanez

Copy link
Copy Markdown
Member

👍

@DeepDiver1975 DeepDiver1975 merged commit 078372b into master Sep 30, 2016
@DeepDiver1975 DeepDiver1975 deleted the preventemptyuid branch September 30, 2016 16:05
@PVince81

PVince81 commented Oct 4, 2016

Copy link
Copy Markdown
Contributor

triple combo facepalm hit combo

@PVince81

PVince81 commented Dec 6, 2016

Copy link
Copy Markdown
Contributor

Please backport to 9.1 and 9.0

@jvillafanez

Copy link
Copy Markdown
Member

stable9.1: owncloud/core#26810
stable9: owncloud/core#26811

@SergioBertolinSG

Copy link
Copy Markdown
Contributor

This field corresponds in the ldap app's expert tab to uuid or internal username?

@INHack20 INHack20 mentioned this pull request Dec 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants