Skip to content

PHPC-1346: Do not allow empty string for username #1012

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

Merged
merged 1 commit into from
Aug 26, 2019

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Aug 22, 2019

https://jira.mongodb.org/browse/PHPC-1346

Since libmongoc does validation in mongoc_uri_parse, passing a username as option in MongoDB\Driver\Manager::construct effectively bypasses sanity checks on the authentication options. Since the check can't be done in mongoc_uri_set_username because the authentication options may change later, we have to replicate the sanity checks from mongoc_uri_finalize_auth here.

@alcaeus alcaeus requested a review from jmikola August 22, 2019 10:34
@alcaeus alcaeus self-assigned this Aug 22, 2019
@alcaeus alcaeus force-pushed the phpc-1346 branch 2 times, most recently from d91717a to 068b62b Compare August 22, 2019 11:08
@jmikola
Copy link
Member

jmikola commented Aug 25, 2019

Suggested test addition, but LGTM either way.

alcaeus added a commit that referenced this pull request Aug 26, 2019
@alcaeus alcaeus merged commit 2f94d95 into mongodb:master Aug 26, 2019
@alcaeus alcaeus deleted the phpc-1346 branch August 26, 2019 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants