Fix browse session authentication and UI - #10
Conversation
|
Hi @SudaisAkbar Thanks, this is generally the right direction. A few things before I can consider a merge. 1. You only reject a second leading So no open redirect (Phoenix catches it), but a 500 an attacker can trigger still at will, on the exact POST that sets the session cookie. Blacklists lose this race every time. Maybe flip it to a whitelist, eg. match 2.
This would mean that on item pages the control is visible but the return path is broken, I think this basically the same like described in the original issue actually. Needs the same prefix as index. 3. logout icon SVG got mangled ?
4. No tests. The four existing browse-auth tests are untouched and green, but the thing this PR exists to fix is not covered. Nothing stops the next refactor from quietly putting 5. Please keep Small polishing you should include:
Ping me when it's pushed, happy to look again quickly. |
|
Hi, I’ve addressed the review comments: Fixed the return_to validation and added security tests. Thank you for checking again! |
Changes
return_toso redirects remain on local paths.redirect(external: ...)with safe local redirects.