zulip/zerver/lib/url_preview
Tim Abbott 4901dc3795 url_preview: Fix parsing of open graph tags.
Our open graph parser logic sloppily mixed data obtained by parsing
open graph properties with trusted data set by our oembed parser.

We fix this by consistenly using our explicit whitelist of generic
properties (image, title, and description) in both places where we
interact with open graph properties.  The fixes are redundant with
each other, but doing both helps in making the intent of the code
clearer.

This issue fixed here was originally reported as an XSS vulnerability
in the upcoming Inline URL Previews feature found by Graham Bleaney
and Ibrahim Mohamed using Pysa.  The recent Oembed changes close that
vulnerability, but this change is still worth doing to make the
implementation do what it looks like it does.
2019-12-12 15:24:38 -08:00
..
parsers url_preview: Fix parsing of open graph tags. 2019-12-12 15:24:38 -08:00
__init__.py Add oembed/Open Graph/Meta tags data retrieval from inline links. 2016-12-07 17:40:18 -08:00
oembed.py url_preview: Fix parsing of open graph tags. 2019-12-12 15:24:38 -08:00
preview.py url_preview: Fix parsing of open graph tags. 2019-12-12 15:24:38 -08:00