Unitech / Unitech/pm2

pm2 serve exposes hidden folders

Open
#5,641 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

What's going wrong?

When running pm2 serve on a folder, all hidden folders (i.e. folders starting with a period) are exposed and served too. A practical example is that the .git folder is now being served to the world wide web too.

How could we reproduce this issue?

Create a subfolder starting with a dot, any contents in that folder will be served.

Supporting information

N/A, pretty easy to replicate.

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 reproducing the issue through the pm2 serve entry point with a directory containing a dot-prefixed folder, including .git. Trace the static serving path and add coverage for hidden-folder requests; done means those folders and their contents are no longer served while ordinary files remain available.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.