-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
ALL
-
Dev Tools 2019-12-30, Dev Tools 2020-01-13, Dev Tools 2020-01-27, Execution Team 2020-04-20
In mongo, we use mongo::uriDecode to decode the encoded uri. But there is a bug corner case. For example:
If the toDecode string is %2(the %2 must be a wrong uri, because it is partial escape sequence at end of string), the size of toDecode is 2. when i is 0, i + 2 = 2, so i + 2 > toDecode.size() is not satisfied, so the process does not enter the branch of if (i + 2 > toDecode.size()), which would return a right status like this:
return Status(ErrorCodes::FailedToParse, "Encountered partial escape sequence at end of string")
- links to