mjackson / mjackson/http-client

Avoid the use of eval()

Open
#54 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I'm in the process of activating CSP for a project. Thereby I, or better the browser, noticed that http-client internally uses eval().
I haven't quite figured out why this necessary at this place, but I'd like to have it replaced with a non eval-construct. Can you help me out?

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 modules/index.js at the eval() use identified in the issue and trace why it is needed in the HTTP client composition path. Replace that construct with a CSP-compatible approach while preserving the existing client behavior, then verify the project’s existing checks still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, security
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.