bramus / bramus/router

unable to capture trailing %2F in url

Open
#137 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
1.1k
Forks
236
PR merge metrics
No merged PRs in 30d

Description

lets say you have
```php
$router->get("/([\s\S]+)",function(){
var_dump(func_get_args());
});
```
the router will not differentiate between the url `/foo` and `foo%2F` and `foo%2f%2f`, any/all trailing `%2F`'s will be trimmed away by the router before going to the callback function

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the example route with `/foo`, `foo%2F`, and `foo%2f%2f`, then trace the router's URL parsing and matching entry point. Done means the callback can distinguish the encoded trailing slashes instead of having them trimmed before dispatch.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.