cleodora-forecasting / cleodora-forecasting/cleodora
Reconsider XSS escaping before saving in the DB
- Dominant language
- Go
- Stars
- 24
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Currently it leads to things like this in the GUI `I haven't even started`.
The following article also makes good points, in particular that every data receiver requires different kind of escaping (HTML, JS, Shell, ...) so it should be responsibility of that receiver to do it. I assume (but need to test!) that React does this correctly, therefore making escaping the HTML before storing in the DB unnecessary.
https://lukeplant.me.uk/blog/posts/why-escape-on-input-is-a-bad-idea/
Contributor guide
Research direction
Start by reproducing the GUI output and tracing where the value is escaped before database storage and where it is rendered by React. Review the linked article and verify the behavior for each receiver involved. Done means the escaping responsibility is decided, the double-escaped display is addressed, and relevant persistence and rendering cases are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, react
- Domain
- databases, full-stack, security
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100