kylewm / woodwind

Unsophisticated stream-style indieweb reader supporting h-feed and xml formats
Other
49 stars 8 forks source link

HTML escaping in syndicate-to #51

Closed valpackett closed 8 years ago

valpackett commented 8 years ago

In the new Micropub syndication targets format, the uid field can be literally anything:

The uid property is opaque to the client, and is the value the client sends in the Micropub request to indicate the targets to syndicate to.

I use HTML (a Bridgy Publish link) as the uid… which breaks Woodwind: screen_2016-05-06-01 51 30

This is vulnerable to XSS — although in this case a user can only attack their own browser, putting untrusted strings directly into HTML is not a good idea.

Woodwind should escape the uid in the template, and unescape when sending Micropub post requests.

kylewm commented 8 years ago

Thanks for the report :+1: