PerlDancer / PerlDancer/Dancer2
Prefix affects interpretation of send_file arg
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 604
- Forks
- 288
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 5
Description
Dancer2::Manual states that the path argument to send_file is relative to the public directory (or absolute, given system_path option). I believe it is a bug to strip the prefix at Dancer2/lib/Dancer2/Core/App.pm:1023,1027. At least the behavior is quite confusing when there is an inadvertent match and that code takes effect.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read Dancer2/lib/Dancer2/Core/App.pm around lines 1023 and 1027, then compare that behavior with the send_file path rules in Dancer2::Manual. Trace how a path matching the prefix is interpreted, and check whether the change should prevent inadvertent prefix stripping while preserving absolute paths and public-directory-relative paths. Done means the behavior is unambiguous and covered by the relevant tests, if present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100