Skip to content

fix: Handle custom error names in TraceKit#1237

Merged
kamilogorek merged 2 commits intomasterfrom
tracekit-custom-errors
Feb 21, 2018
Merged

fix: Handle custom error names in TraceKit#1237
kamilogorek merged 2 commits intomasterfrom
tracekit-custom-errors

Conversation

@kamilogorek
Copy link
Contributor

Fixes #1209 (comment)

There's no RegExp that cannot be extended and still pass all unit tests


var chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,
gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,
gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource).*?:\/.*?|\[native code\]|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty sure blob is blob:foo and not blob://fo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blob is blob:http://url/for/some/endpoint, which is matched by blob.*?:\/:) We have a test for it in place

Copy link
Contributor

@mitsuhiko mitsuhiko Feb 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That depends on the browser. Current chrome adds the http origin to it, but blob:UUID is perfectly permissible and shows up in Firefox for instance.

You can try with (URL.createObjectURL(new Blob([new Int8Array()]))).toString()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently blob urls are now supposed to always have an origin. Since they are rare I might be okay with that but please add a comment why blob is okay.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added appropriate note and reformatted variables slightly so it's easier to move around.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also made it two separate commits so it's easier to track precise changes

@kamilogorek kamilogorek force-pushed the tracekit-custom-errors branch 2 times, most recently from 14489ea to 1cc1915 Compare February 20, 2018 15:27
@kamilogorek kamilogorek force-pushed the tracekit-custom-errors branch from 1cc1915 to 845c83b Compare February 21, 2018 13:01
@kamilogorek kamilogorek merged commit 114c958 into master Feb 21, 2018
@kamilogorek kamilogorek deleted the tracekit-custom-errors branch February 21, 2018 13:10
chargome added a commit that referenced this pull request Mar 23, 2026
Fixes Dependabot alerts #1236 (SSE Event Injection) and #1237
(Path Traversal via Double Decoding) by updating the yarn.lock
resolution for h3 from 1.15.5 to 1.15.10.

Co-Authored-By: Claude <noreply@anthropic.com>
chargome added a commit that referenced this pull request Mar 23, 2026
Fixes Dependabot alerts #1236 (SSE Event Injection) and #1237 (Path
Traversal via Double Decoding) by updating the yarn.lock resolution for
h3 from 1.15.5 to 1.15.10.

Easier fix than
#19910 as Nuxt 3.21.x
introduced breaking type changes (removed nitro from NuxtOptions and
nitro:config from NuxtHooks).

Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
logaretm pushed a commit that referenced this pull request Mar 24, 2026
Fixes Dependabot alerts #1236 (SSE Event Injection) and #1237 (Path
Traversal via Double Decoding) by updating the yarn.lock resolution for
h3 from 1.15.5 to 1.15.10.

Easier fix than
#19910 as Nuxt 3.21.x
introduced breaking type changes (removed nitro from NuxtOptions and
nitro:config from NuxtHooks).

Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants