From 7b5f804551dc86c1b94160134b371f5cd8f405cc Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Thu, 11 May 2017 21:14:51 +0200 Subject: [PATCH] Add Iframely in sneaky user-agents This "embeds as a service" is used by many apps/websites. Discovered when my pass got eaten by the HipChat preview. --- snappass/main.py | 3 ++- tests.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/snappass/main.py b/snappass/main.py index f272d41..77ed7bf 100644 --- a/snappass/main.py +++ b/snappass/main.py @@ -10,7 +10,8 @@ from flask import abort, Flask, render_template, request SNEAKY_USER_AGENTS = ('Slackbot', 'facebookexternalhit', 'Twitterbot', - 'Facebot', 'WhatsApp', 'SkypeUriPreview') + 'Facebot', 'WhatsApp', 'SkypeUriPreview', + 'Iframely') SNEAKY_USER_AGENTS_RE = re.compile('|'.join(SNEAKY_USER_AGENTS)) NO_SSL = os.environ.get('NO_SSL', False) diff --git a/tests.py b/tests.py index 9203f15..f25cc5b 100644 --- a/tests.py +++ b/tests.py @@ -86,7 +86,8 @@ class SnapPassRoutesTestCase(TestCase): "Twitterbot/1.0", "_WhatsApp/2.12.81 (Windows NT 6.1; U; es-ES) Presto/2.9.181 Version/12.00", "WhatsApp/2.16.6/i", - "SkypeUriPreview Preview/0.5" + "SkypeUriPreview Preview/0.5", + "Iframely/0.8.5 (+http://iframely.com/;)", ] for ua in a_few_sneaky_bots: