[SERVER-36272] Shell assertion failure with certain characters in the password Created: 24/Jul/18 Updated: 29/Oct/23 Resolved: 12/Oct/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 4.0.0 |
| Fix Version/s: | 4.0.5, 4.1.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dan Dascalescu | Assignee: | Shreyas Kalyan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
MongoDB shell version v4.0.0 |
||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Backport Requested: |
v4.0
|
||||||||||||||||
| Sprint: | Security 2018-10-08, Security 2018-10-22 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
I've created a user with a password that contains '%' and ','. When I try to connect, mongo mongodb://myuser:K+4,%j@mydomain.com:12345/dbname mongo borks with this error: 2018-07-24T14:18:52.110-0700 E - [main] Assertion failure false src/mongo/util/hex.h 48 ,{"b":"558A6F8B2000","o":"135CEBA","s":"ZN5mongo10logContextEPKc"},{"b":"558A6F8B2000","o":"6AFADC","s":"_ZN5mongo12verifyFailedEPKcS1_j"},{"b":"558A6F8B2000","o":"11237B8","s":"_ZN5mongo9uriDecodeB5cxx11ENS_10StringDataE"},{"b":"558A6F8B2000","o":"1124F4B","s":"_ZN5mongo8MongoURI9parseImplERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE"},{"b":"558A6F8B2000","o":"1128151","s":"_ZN5mongo8MongoURI5parseERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE"},{"b":"558A6F8B2000","o":"711408","s":"_ZN5mongo22storeMongoShellOptionsERKNS_17optionenvironment11EnvironmentERKSt6vectorINSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EE"},{"b":"558A6F8B2000","o":"6EEE48","s":"_ZN5mongo49_mongoInitializerFunction_MongoShellOptions_StoreEPNS_18InitializerContextE"},{"b":"558A6F8B2000","o":"6E7303","s":"_ZNSt17_Function_handlerIFN5mongo6StatusEPNS0_18InitializerContextEEPS4_E9_M_invokeERKSt9_Any_dataOS3"},{"b":"558A6F8B2000","o":"1311011","s":"ZN5mongo11Initializer19executeInitializersERKSt6vectorINSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKSt3mapIS7_S7_St4lessIS7_ESaISt4pairIKS7_S7_EEE"},{"b":"558A6F8B2000","o":"1311882","s":"_ZN5mongo21runGlobalInitializersEiPKPKcS3"},{"b":"558A6F8B2000","o":"1311C0C","s":"ZN5mongo26runGlobalInitializersOrDieEiPKPKcS3"},{"b":"558A6F8B2000","o":"6E2336","s":"Z5_mainiPPcS0"},{"b":"558A6F8B2000","o":"6B20FE","s":"main"},{"b":"7F275FEC2000","o":"20830","s":"__libc_start_main"},{"b":"558A6F8B2000","o":"6DC039","s":"_start"}]}
For passwords like "K/4,%j", I get "FailedToParse: Bad digit "K" while parsing K". |
| Comments |
| Comment by Githook User [ 13/Nov/18 ] |
|
Author: {'name': 'Shreyas Kalyan', 'email': 'shreyaskalyan@gmail.com', 'username': 'shreyaskal'}Message: (cherry picked from commit 2e58710210f996eea00e192f987ae90acb71abbf) |
| Comment by Githook User [ 12/Oct/18 ] |
|
Author: {'name': 'Shreyas Kalyan', 'email': 'shreyaskalyan@gmail.com', 'username': 'shreyaskal'}Message: |
| Comment by Mark Benvenuto [ 06/Aug/18 ] |
|
dandv there are two issues here:
|