facebookarchive / flux

Application Architecture for Building User Interfaces
https://facebookarchive.github.io/flux/
Other
17.48k stars 3.46k forks source link

HTML-escape error responses in flux-async example #554

Closed max-schaefer closed 2 years ago

max-schaefer commented 2 years ago

The flux-async example app embeds unsanitised query parameters in HTTP error responses. Of course, it's only an example, so this isn't a real security vulnerability, but it might perhaps make sense to introduce sanitisation anyway, in case people copy it for real usage.

(In fact, the original example app is safe, since the error response is always a constant string. That seems to have been an accident, though, and I think it was meant to be a template string embedding the missing ID, cf first commit.)

yangshun commented 2 years ago

Thank you!