Return a refused 'Manage plan' click to the page it came from
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 62/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- full-stack
Research direction
Start in the plan handoff route and its error redirect to /w/<slug>/settings?plan_error=, then the two places that render the Manage plan card (General settings and the plan page) and the page that reads plan_error. Pass the origin page as a fixed value from a closed list of the two pages, falling back to General. Read src/plan-handoff/README.md too. Done when tests T01 to T06 in the issue pass, including the Location check for 303 responses.
Written by the indexing model from the issue text.
Description
Follow-up of #284 (plan hand-over) and #282 (plan and usage page). Part of #268.
Problem
"Manage plan" is on the General settings page and on the plan page. A click that the route refuses (cross_site_request, rate_limited) always answers 303 back to /w/<slug>/settings?plan_error=<code>. A person who clicked on the plan page therefore ends on General, with the message next to the card there. The route never reads the body or the query of the request (no open redirect, by design in #284), so it cannot know where the click came from.
Behavior
- A refused click returns the person to the page they clicked on, with the same message next to the card.
- The route still never reads anything from the request that chooses a target. The place the click came from is decided only from a closed list of the two pages (for example one fixed form action path per page, or a fixed value from a closed set), never from a free address, so there is still no open redirect.
- An unknown or missing origin falls back to General settings, as today.
- No change for a successful click (still
303to the configured page with the token).
Scope
The handoff route and its error redirect, the two places that render the card, the page that reads plan_error, src/plan-handoff/README.md.
Out of scope
Anything about the hand-over target or token (#284), the plan page content (#282).
Test cases
| ID | kind | level | case | expected |
|---|---|---|---|---|
| T01 | regression | integration | refused click from General (cross-site, rate limit) | 303 to General with plan_error as today |
| T02 | behavior | integration | refused click from the plan page | 303 to the plan page with plan_error |
| T03 | security | integration | an origin signal that is another address, an absolute URL, a path outside the two pages or an unknown value | falls back to General; the Location is always a path of this app from the closed list |
| T04 | regression | integration | successful click from either page | 303 to the configured page with the token, as today |
| T05 | behavior | unit | the plan page and General read plan_error |
the message shows next to the card on the page that was clicked, and nothing for any other value |
| T06 | security | integration | free-form data in the body or an address in the request | never chooses the target; only the closed list of the two pages does |
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- Avg merge
- 1h 15m
- Merged PRs (30d)
- 217
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from ExpidetGames/code-reviewer
-
area: app type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
ExpidetGames/code-reviewer#308 ·
Maintainers usually reply within 1 day
-
type: docs
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ExpidetGames/code-reviewer#94 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
ExpidetGames/code-reviewer#401 ·
Maintainers usually reply within 1 day
-
area: app type: chore
Difficulty 3/5 1-2 days Newbie friendliness 45/100
ExpidetGames/code-reviewer#393 ·
Maintainers usually reply within 1 day
-
area: runner type: bug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
ExpidetGames/code-reviewer#390 ·
Maintainers usually reply within 1 day
All issues in ExpidetGames/code-reviewer
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Chocobozzz/PeerTube#7832 ·
Maintainers usually reply within 3 days
-
Pay to use?Open
Difficulty 1/5 Under an hour Newbie friendliness 66/100
darkreader/darkreader#16108 · 1 comment ·
Maintainers usually reply within 2 days
-
Add: Dak Nong TV SDOpencheck:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
bug engine
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
frostney/GocciaScript#1746 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
agilepathway/label-checker#739 · 4 comments ·
Maintainers usually reply within 1 day