-
Notifications
You must be signed in to change notification settings - Fork 1.1k
DATAMONGO-2016 fixing issue where question mark in password broke option extraction #578
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
Conversation
@steve-thousand Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@@ -164,7 +165,7 @@ private static String extractDB(String text) { | |||
private static Properties extractOptions(String text) { | |||
|
|||
int optionsSeparationIndex = text.lastIndexOf(OPTIONS_DELIMITER); | |||
int dbSeparationIndex = text.lastIndexOf(OPTIONS_DELIMITER); | |||
int dbSeparationIndex = text.lastIndexOf(DATABASE_DELIMITER); |
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.
this line in the source jumped out at me as a possible copy/paste error. changing the delimiter we check for fixed the issue
@steve-thousand Thank you for signing the Contributor License Agreement! |
I filed https://jira.spring.io/browse/DATAMONGO-2016 to track this issue. Please go to https://jira.spring.io/secure/Signup!default.jspa and create a user account so we can collaborate on the ticket. Please attach a stack trace to the mentioned ticket as comment. |
Thanks @mp911de I've attached the stacktrace to the ticket, added the ticket number to the tests I added, and updated the pull request title to include the ticket number. |
…ropertyEditor. MongoCredentialPropertyEditor inspects now the connection URI for the appropriate delimiter tokens. Previously, inspection used the char questionmark for username/password delimiter inspection. Original pull request: #578.
Fail gracefully if query string parameter has no value. Reformat test. Convert assertions to AssertJ. Original pull request: #578.
…ropertyEditor. MongoCredentialPropertyEditor inspects now the connection URI for the appropriate delimiter tokens. Previously, inspection used the char questionmark for username/password delimiter inspection. Original pull request: #578.
Fail gracefully if query string parameter has no value. Reformat test. Convert assertions to AssertJ. Original pull request: #578.
…ropertyEditor. MongoCredentialPropertyEditor inspects now the connection URI for the appropriate delimiter tokens. Previously, inspection used the char questionmark for username/password delimiter inspection. Original pull request: #578.
Fail gracefully if query string parameter has no value. Reformat test. Original pull request: #578.
Thanks a lot for your contribution. That's merged, polished, and backported now. |
I tried to follow the guidelines, but I can't seem to figure out how to create a bug for this issue in the JIRA. This is actually my first attempt at a contribution so I'm sure I'm missing something. I did search the JIRA for an issue with credentials and "?" characters but couldn't find one.
The issue I've run into is that if a mongo password contains a "?" character, but no auth-mechanism option, then the MongoCredentialPropertyEditor will throw an ArrayIndexOutOfBoundsException. I've done some research on mongo password rules and there doesn't seem to be any limit on using a "?" in the password.