[SERVER-12116] Running user commands with auth schema version as wrong type in db gives misleading error message Created: 16/Dec/13 Updated: 11/Jul/16 Resolved: 03/Mar/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Security, Usability |
| Affects Version/s: | 2.5.4 |
| Fix Version/s: | 2.6.0-rc1 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | sam.helman@10gen.com | Assignee: | Spencer Brody (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | 26qa | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
To reproduce:
The error message is a little misleading - it reports that the current schema version is 0, instead of the wrong type. It is conceivable that while running a downgrade someone could mistakenly set the value to a string type and get this error. A js script to reproduce the error is attached. |
| Comments |
| Comment by Githook User [ 03/Mar/14 ] |
|
Author: {u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}Message: |
| Comment by Andy Schwerin [ 10/Feb/14 ] |
|
Two thoughts. First, can we replace "2" with the string name of the type – I'm pretty sure that the BSON library has a function for looking up string names of types. And it would be preferable to return a more meaningful message to the user. They may not have easy access to the server logs. |
| Comment by Spencer Brody (Inactive) [ 05/Feb/14 ] |
|
The message returned to the user is as you described, but there will also be a message logged on the server: "warning: Could not determine schema version of authorization data. TypeMismatch Bad (non-numeric) type 2 for currentVersion field in version document". schwerin, do you think that's sufficient? |