question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Special characters in URL cause OpenCensus to crash

See original GitHub issue

Please 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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mayurkale22commented, Oct 9, 2019

Published in 0.0.18, let us know if you encounter any issues!

0reactions
jdbennet2001commented, Oct 7, 2019

Brilliant. Thank you.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found