[SERVER-14158] ShardingTest and authutil js incorrectly handle keyfile authentication Created: 04/Jun/14 Updated: 03/Jul/14 Resolved: 14/Jun/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Security, Testing Infrastructure |
| Affects Version/s: | None |
| Fix Version/s: | 2.7.3 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Kevin Pulo | Assignee: | Matt Kangas |
| Resolution: | Done | Votes: | 0 |
| Labels: | community-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Server 2.7.3 |
| Participants: |
| Description |
|
Based on the server strips out all forms of whitespace from keyfiles. However, ShardingTest and authutil.asCluster both incorrectly strip only spaces and newlines, instead of everything between 011 and 015, and space (040).
|
| Comments |
| Comment by Matt Kangas [ 14/Jun/14 ] | |
|
No server code modified, but improves usability of tests on Windows. | |
| Comment by Githook User [ 14/Jun/14 ] | |
|
Author: {u'name': u'Kevin Pulo', u'email': u'kevin.pulo@mongodb.com'}Message: Signed-off-by: Matt Kangas <matt.kangas@mongodb.com> | |
| Comment by Kevin Pulo [ 06/Jun/14 ] | |
|
I expect that the current tests succeed because the jstests/libs/key1 and key2 files only contain space and newline, but not any of the other problematic characters. It would be great to add a key3 (and corresponding tests of ShardingTest and authutil.asCluster) along the lines of
I expect that such tests would fail with current HEAD, and succeed with the above patch. I'll see if I can find some time to add and check this. | |
| Comment by Matt Kangas [ 04/Jun/14 ] | |
|
As it stands, this means tests do not succeed if the keyfile contains Windows CRLF? |