René's URL Explorer Experiment


Title: Runaway regular expressions in stack trace parser · Issue #57 · stacktracejs/error-stack-parser · GitHub

Open Graph Title: Runaway regular expressions in stack trace parser · Issue #57 · stacktracejs/error-stack-parser

X Title: Runaway regular expressions in stack trace parser · Issue #57 · stacktracejs/error-stack-parser

Description: This line: error-stack-parser/error-stack-parser.js Line 103 in a3bf972 var functionNameRegex = /((.*".+"[^@]*)?[^@]*)(?:@)/; freezes given the following input: " error("Warning: Received `%s` for a non-boolean attribute `%s`.\n\nIf you ...

Open Graph Description: This line: error-stack-parser/error-stack-parser.js Line 103 in a3bf972 var functionNameRegex = /((.*".+"[^@]*)?[^@]*)(?:@)/; freezes given the following input: " error("Warning: Received `%s` for ...

X Description: This line: error-stack-parser/error-stack-parser.js Line 103 in a3bf972 var functionNameRegex = /((.*".+"[^@]*)?[^@]*)(?:@)/; freezes given the following input: " error("Warning...

Opengraph URL: https://github.com/stacktracejs/error-stack-parser/issues/57

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Runaway regular expressions in stack trace parser","articleBody":"This line: https://github.com/stacktracejs/error-stack-parser/blob/a3bf972e399fd39222d97f4dc241a74cc483b4db/error-stack-parser.js#L103 freezes given the following input:\r\n\r\n```\r\n\"    error(\"Warning: Received `%s` for a non-boolean attribute `%s`.\\n\\nIf you want to write it to the DOM, pass a string instead: %s=\\\"%s\\\" or %s={value.toString()}.\\n\\nIf you used to conditionally omit it with %s={condition \u0026\u0026 value}, pass %s={condition ? value : undefined} instead.%s\", \"false\", \"loading\", \"loading\", \"false\", \"loading\", \"loading\", \"loading\", \"\\n    in button (created by Context.Consumer)\\n    in StyledButton (at overrideOptional.tsx:16)\\n    in Overridable(StyledButton) (at Button.tsx:108)\\n    in Button (created by Context.Consumer)\\n    in StyledButton (at Button.tsx:51)\\n    in ButtonWithArrow (at overrideOptional.tsx:16)\\n    in Overridden(Button) (created by Context.Consumer)\\n    in ButtonPrimary (at overrideOptional.tsx:16)\\n    in Overridden(Styled(Overridable(Button))) (at Submit.tsx:7)\\n    in Submit (at AddToCartForm.tsx:98)\\n    in form (created by Form)\\n    in FormProvider (created by Form)\\n    in Form (at AddToCartForm.tsx:97)\\n    in AddToCartForm (at ProductAddToCartForm.tsx:68)\\n    in ProductAddToCartForm (at ProductPageInfoSide.tsx:244)\\n    in div (created by Context.Consumer)\\n    in Card (at ProductPageInfoSide.tsx:153)\\n    in div (created by Context.Consumer)\\n    in ProductInfo (at ProductPageInfoSide.tsx:152)\\n    in ProductPageInfoSide (at ProductPage.tsx:194)\\n    in div (created by Context.Consumer)\\n    in ProductTop (at ProductPage.tsx:173)\\n    in div (created by Context.Consumer)\\n    in Wrapper (at Container.tsx:114)\\n    in ForwardRef(_c) (at ProductPage.tsx:166)\\n    in article (at ProductPage.tsx:165)\\n    in main (created by Context.Consumer)\\n    in Content (at PageWrapper.tsx:74)\\n    in div (created by Context.Consumer)\\n    in Page (at PageWrapper.tsx:65)\\n    in PortalTarget (at PageWrapper.tsx:64)\\n    in PageWrapper (at ProductPage.tsx:156)\\n    in ProductPage (at overrideOptional.tsx:16)\\n    in Overridable(ProductPage) (at DynamicRouteResolver.tsx:54)\\n    in DynamicRouteResolver (created by Context.Consumer)\\n    in Route (at AppRouter.tsx:25)\\n    in Switch (at AppRouter.tsx:14)\\n    in AppRouter (at App.tsx:32)\\n    in BreakpointsProvider (at AppProviders.tsx:38)\\n    in ApolloProvider (at ApolloConnector.tsx:68)\\n    in ApolloConnector (at AppProviders.tsx:30)\\n    in Router (at RouterProvider.tsx:18)\\n    in RouterProvider (at AppProviders.tsx:29)\\n    in StoreViewProvider (at AppProviders.tsx:25)\\n    in ErrorBoundary (at RootErrorBoundary.tsx:105)\\n    in RootErrorBoundary (at AppProviders.tsx:24)\\n    in I18nProvider (at I18nLoader.tsx:19)\\n    in I18nLoader (at AppProviders.tsx:23)\\n    in AppProviders (at App.tsx:28)\\n    in App (at src/index.tsx:30)\") at console.error (http://localhost:3340/__cypress/runner/cypress_runner.js:140661:26)\"\r\n```\r\n\r\n## Expected Behavior\r\nIt should not freeze the browser.\r\n\r\n## Current Behavior\r\nThe regex takes a very long time to parse the string\r\n\r\n## Steps to Reproduce (for bugs)\r\nPaste in the browser console:\r\n```\r\n\"    error(\"Warning: Received `%s` for a non-boolean attribute `%s`.\\n\\nIf you want to write it to the DOM, pass a string instead: %s=\\\"%s\\\" or %s={value.toString()}.\\n\\nIf you used to conditionally omit it with %s={condition \u0026\u0026 value}, pass %s={condition ? value : undefined} instead.%s\", \"false\", \"loading\", \"loading\", \"false\", \"loading\", \"loading\", \"loading\", \"\\n    in button (created by Context.Consumer)\\n    in StyledButton (at overrideOptional.tsx:16)\\n    in Overridable(StyledButton) (at Button.tsx:108)\\n    in Button (created by Context.Consumer)\\n    in StyledButton (at Button.tsx:51)\\n    in ButtonWithArrow (at overrideOptional.tsx:16)\\n    in Overridden(Button) (created by Context.Consumer)\\n    in ButtonPrimary (at overrideOptional.tsx:16)\\n    in Overridden(Styled(Overridable(Button))) (at Submit.tsx:7)\\n    in Submit (at AddToCartForm.tsx:98)\\n    in form (created by Form)\\n    in FormProvider (created by Form)\\n    in Form (at AddToCartForm.tsx:97)\\n    in AddToCartForm (at ProductAddToCartForm.tsx:68)\\n    in ProductAddToCartForm (at ProductPageInfoSide.tsx:244)\\n    in div (created by Context.Consumer)\\n    in Card (at ProductPageInfoSide.tsx:153)\\n    in div (created by Context.Consumer)\\n    in ProductInfo (at ProductPageInfoSide.tsx:152)\\n    in ProductPageInfoSide (at ProductPage.tsx:194)\\n    in div (created by Context.Consumer)\\n    in ProductTop (at ProductPage.tsx:173)\\n    in div (created by Context.Consumer)\\n    in Wrapper (at Container.tsx:114)\\n    in ForwardRef(_c) (at ProductPage.tsx:166)\\n    in article (at ProductPage.tsx:165)\\n    in main (created by Context.Consumer)\\n    in Content (at PageWrapper.tsx:74)\\n    in div (created by Context.Consumer)\\n    in Page (at PageWrapper.tsx:65)\\n    in PortalTarget (at PageWrapper.tsx:64)\\n    in PageWrapper (at ProductPage.tsx:156)\\n    in ProductPage (at overrideOptional.tsx:16)\\n    in Overridable(ProductPage) (at DynamicRouteResolver.tsx:54)\\n    in DynamicRouteResolver (created by Context.Consumer)\\n    in Route (at AppRouter.tsx:25)\\n    in Switch (at AppRouter.tsx:14)\\n    in AppRouter (at App.tsx:32)\\n    in BreakpointsProvider (at AppProviders.tsx:38)\\n    in ApolloProvider (at ApolloConnector.tsx:68)\\n    in ApolloConnector (at AppProviders.tsx:30)\\n    in Router (at RouterProvider.tsx:18)\\n    in RouterProvider (at AppProviders.tsx:29)\\n    in StoreViewProvider (at AppProviders.tsx:25)\\n    in ErrorBoundary (at RootErrorBoundary.tsx:105)\\n    in RootErrorBoundary (at AppProviders.tsx:24)\\n    in I18nProvider (at I18nLoader.tsx:19)\\n    in I18nLoader (at AppProviders.tsx:23)\\n    in AppProviders (at App.tsx:28)\\n    in App (at src/index.tsx:30)\") at console.error (http://localhost:3340/__cypress/runner/cypress_runner.js:140661:26)\".match(/((.*\".+\"[^@]*)?[^@]*)(?:@)/)\r\n```\r\n\r\n## Context\r\nI am running Cypress tests against a React app. React dumps the component stack in the stack trace when it throws an error or warning for a component.\r\n\r\n## Your Environment\r\n* stacktrace.js version: error-stack-parser@2.0.6\r\n* Browser Name and version: Chrome 87, probably reproducible in all browsers.\r\n* Operating System and version (desktop or mobile): MacOS\r\n* Link to your project: N/A\r\n\r\n## Possible Solution\r\nA different RegEx, or no RegEx at all.\r\n","author":{"url":"https://github.com/MartijnHols","@type":"Person","name":"MartijnHols"},"datePublished":"2020-12-14T12:40:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/57/error-stack-parser/issues/57"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7e66d63b-24a3-3514-7188-fb50a52b09cf
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE426:22585E:5689D8:78A788:696F3C83
html-safe-nonce7ffe1b77bb793806cd055431f04f203849e4b75b432b897944911dfb4614a868
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDI2OjIyNTg1RTo1Njg5RDg6NzhBNzg4OjY5NkYzQzgzIiwidmlzaXRvcl9pZCI6Ijg2MzM5NjcxMjY3Njg0NjcwNzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacde1bfbc5fcdd49c28fb8ccbea677a4fa009c39e056ee357508eee03b8785779b
hovercard-subject-tagissue:766387740
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/stacktracejs/error-stack-parser/57/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0725d79426258628062a88bc29afe3b9c25fde66a5a740ac172ca804189e4479/stacktracejs/error-stack-parser/issues/57
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0725d79426258628062a88bc29afe3b9c25fde66a5a740ac172ca804189e4479/stacktracejs/error-stack-parser/issues/57
og:image:altThis line: error-stack-parser/error-stack-parser.js Line 103 in a3bf972 var functionNameRegex = /((.*".+"[^@]*)?[^@]*)(?:@)/; freezes given the following input: " error("Warning: Received `%s` for ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameMartijnHols
hostnamegithub.com
expected-hostnamegithub.com
Noneb278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee
turbo-cache-controlno-preview
go-importgithub.com/stacktracejs/error-stack-parser git https://github.com/stacktracejs/error-stack-parser.git
octolytics-dimension-user_id6131251
octolytics-dimension-user_loginstacktracejs
octolytics-dimension-repository_id15014773
octolytics-dimension-repository_nwostacktracejs/error-stack-parser
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id15014773
octolytics-dimension-repository_network_root_nwostacktracejs/error-stack-parser
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release39aed5006635ab6f45e6b77d23e73b08a00272a3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues/57#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstacktracejs%2Ferror-stack-parser%2Fissues%2F57
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstacktracejs%2Ferror-stack-parser%2Fissues%2F57
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=stacktracejs%2Ferror-stack-parser
Reloadhttps://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues/57
Reloadhttps://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues/57
Reloadhttps://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues/57
stacktracejs https://patch-diff.githubusercontent.com/stacktracejs
error-stack-parserhttps://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fstacktracejs%2Ferror-stack-parser
Fork 51 https://patch-diff.githubusercontent.com/login?return_to=%2Fstacktracejs%2Ferror-stack-parser
Star 483 https://patch-diff.githubusercontent.com/login?return_to=%2Fstacktracejs%2Ferror-stack-parser
Code https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser
Issues 14 https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues
Pull requests 9 https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/pulls
Actions https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/actions
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/security
Please reload this pagehttps://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues/57
Insights https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/pulse
Code https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser
Issues https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues
Pull requests https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/pulls
Actions https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/actions
Security https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/security
Insights https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/stacktracejs/error-stack-parser/issues/57
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/stacktracejs/error-stack-parser/issues/57
Runaway regular expressions in stack trace parserhttps://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/issues/57#top
https://github.com/MartijnHols
https://github.com/MartijnHols
MartijnHolshttps://github.com/MartijnHols
on Dec 14, 2020https://github.com/stacktracejs/error-stack-parser/issues/57#issue-766387740
error-stack-parser/error-stack-parser.jshttps://github.com/stacktracejs/error-stack-parser/blob/a3bf972e399fd39222d97f4dc241a74cc483b4db/error-stack-parser.js#L103
a3bf972https://patch-diff.githubusercontent.com/stacktracejs/error-stack-parser/commit/a3bf972e399fd39222d97f4dc241a74cc483b4db
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.