vercel / vercel/sdk

Bug: .domainsRegistrar.buySingleDomain() doesn't sanitize inputs

Open
#183 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
160
Forks
42
Avg merge
19h 36m
Merged PRs (30d)
16

Description

Received an error from the Vercel API that the firstName field had a trailing space. I'm assuming I'd get the same error for other fields if they aren't .trim()'d before passing into the SDK?

Seems like something the lib could just do for the consumer instead of putting that onus on the consuming code?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating .domainsRegistrar.buySingleDomain() and inspect how its inputs are passed to the Vercel API. Reproduce the reported trailing-space error, determine which fields need sanitizing, and consider the work done when those inputs are sanitized before the request and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.