Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: extension freezing when validating a specifically malformed network URL #1459

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

arthurgeron
Copy link
Contributor

@arthurgeron arthurgeron commented Sep 7, 2024

Context

With the previous regular expression, trying to parse a specifically malformed string would block the V8 thread (good catch @LuizAsFight!). More info on the issue can be read about here.

Changes

  • Optimized expression
  • Added named matching groups
  • Moved regular expression to be a global, avoiding instantiating it at the method's execution time

Closes #1460

@arthurgeron arthurgeron force-pushed the ag/fix/network-freeze-on-network-validation branch from daf1a64 to 51a95b2 Compare September 7, 2024 16:30
@arthurgeron arthurgeron changed the title fix: extension freeze when validating malformed strings fix: extension freezing when validating a specifically malformed network URL Sep 7, 2024
@arthurgeron arthurgeron merged commit 00234c0 into master Sep 9, 2024
23 checks passed
@arthurgeron arthurgeron deleted the ag/fix/network-freeze-on-network-validation branch September 9, 2024 16:09
LuizAsFight pushed a commit that referenced this pull request Sep 10, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to master, this PR
will be updated.


# Releases
## fuels-wallet@0.27.4

### Patch Changes

- [#1463](#1463)
[`4fbc6955`](4fbc695)
Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - force
providerUrl on signTransactions, instead of using directly from provider

- [#1459](#1459)
[`00234c0a`](00234c0)
Thanks [@arthurgeron](https://github.com/arthurgeron)! - Fixed extension
freezing when validating a specifically malformed network URL

-   Updated dependencies \[]:
    -   @fuel-wallet/connections@0.27.4

## @fuel-wallet/connections@0.27.4



## @fuel-wallet/types@0.27.4

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.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.

Extension becomes unusable after trying to validate a specifically malformed string
2 participants