[CDRIVER-1987] mongoc_uri_unescape() silently fails on invalid percent-encoding Created: 09/Jan/17  Updated: 03/May/17  Resolved: 14/Mar/17

Status: Closed
Project: C Driver
Component/s: uri
Affects Version/s: 1.5.1
Fix Version/s: 1.7.0

Type: Bug Priority: Major - P3
Reporter: Jeremy Mikola Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Epic Link: C Driver Connection String Spec

 Description   

mongodb/specifications#105 was opened to address an ambiguity with the connection string spec and require "%" characters in the username or password component of a URI to be escaped.

While examining how libmongoc handles unescaping, I realized that mongoc_uri_unescape() appears to fail silently if it encounters an invalid escape sequence. Should libmongoc at least log a warning before it returns NULL in this case?



 Comments   
Comment by Githook User [ 14/Mar/17 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-1987 mongoc_uri_unescape() silently fails on invalid percent-encoding
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/2218660e08ae6871e202a6067c00421ea571133e

Generated at Wed Feb 07 21:13:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.