apigee / apigee/apigeetool-node

.netrc option fails if password has a #

Open
#134 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
91
Forks
91
PR merge metrics
No merged PRs in 30d

Description

If the password being used has a # in it and the .netrc option is used then the calls fail with 401. On further debugging I realized that the password being read gets truncated at the #. Eg: if the password is test#123 then the password read by the index.js file is test. And obviously this fails during the authentication check. Passing the same password via the -p option or the environment variable works fine.

Seems like it's an issue with the netrc parser being used. It is searching for the # character and stripping the # and everything that follows it assuming it to be a comment.

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 in index.js and trace how the .netrc parser reads passwords, focusing on the handling of the # character. Confirm that a password such as test#123 is preserved and that authentication succeeds when supplied through .netrc, while existing -p and environment-variable behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli
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.