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: incorrect match length check in getGatewayUrl #2152

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

barajeel
Copy link

@barajeel barajeel commented Apr 2, 2025

What changed? Why?
I fixed an issue in the getGatewayUrl function where match.length was being accessed. This was problematic because exec() can return null, and trying to check match.length would cause a TypeError. I replaced the check to ensure that match[2] exists, which is safer and prevents errors.

Notes to reviewers
Please review the change to ensure the check is now more robust and does not break functionality. It would be great if you could check other parts of the codebase that might rely on the getGatewayUrl function to confirm no other issues are present.

How has it been tested?
The code has been tested locally to confirm that the issue is resolved and no TypeErrors occur when match is null.

Have you tested the following pages?

BaseWeb

  • base.org
  • base.org/names
  • base.org/builders
  • base.org/ecosystem
  • base.org/name/jesse
  • base.org/manage-names
  • base.org/resources

BaseDocs

  • docs.base.org
  • docs sub-pages

Copy link

vercel bot commented Apr 2, 2025

@barajeel is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@cb-heimdall
Copy link
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

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