Special characters in URL cause OpenCensus to crash
See original GitHub issuePlease answer these questions before submitting a bug report.
What version of OpenCensus are you using?
0.0.17
What version of Node are you using?
10.x
What did you do?
If possible, provide a recipe for reproducing the error.
The Coremetrics library includes campaign (or tracking) information in the URLs for our application. This information may contain non-printable character, such as:
{ cm_sp: '000032GHâ=http://ibm.biz/cfc-2019' }
The URL is processed in http.js:
tags.set(stats.HTTP_SERVER_ROUTE, {
value: (requestUrl.path || '').substring(0, TAG_VALUE_MAX_LENGTH),
}, UNLIMITED_PROPAGATION_MD);
which causes an exception to be thrown, crashing the application.
In TagMap.js @ line 38:
if (!validation_1.isValidTagKey(tagKey)) {
throw new Error(`Invalid TagKey name: ${tagKey.name}`);
}
What did you expect to see?
The data should be contained in the tag, or discarded.
What did you see instead?
Application crash
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Url Encoding Issue - Special Characters originate webserver ...
This request is normally processed. However, when applying the real deal, my webserver is crashing. http://5.43.52.4/api.html?ATCOMMAND=AT% ...
Read more >Using URL encoding to handle special characters in a ...
The <space> character needs to be encoded because it is not a valid URL character. Also, some characters, such as "~" might not...
Read more >(Please) Stop Using Unsafe Characters in URLs
The characters < and > are unsafe because they are used as the delimiters around URLs in free text; the quote mark (...
Read more >Url with special characters like [] or {} crashes. #1862 - GitHub
Hey there, In my app, I need to do requests to services with urls including special characters like {,[,],}. However Alamofire crashes when ......
Read more >These 16 characters crash Google Chrome - VentureBeat
It seems to be crashing in some very old code. In the Debug build, it's hitting a DCHECK on an invalid URL in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Published in
0.0.18
, let us know if you encounter any issues!Brilliant. Thank you.