From c247379ccdb24c454d80b36f7608409bd1cb0dd5 Mon Sep 17 00:00:00 2001 From: Ryan Barrett Date: Fri, 11 Aug 2023 11:39:11 -0700 Subject: [PATCH] allow redirects on Bridgy, Bridgy Fed, and appspot.com fixes #118. as far as we can tell, this is probably the root cause of many of these bugs filed against webmention.io over the last couple years, https://github.com/aaronpk/webmention.io/issues , eg #188, #187, #175, #173, etc. @aaronpk [said](https://chat.indieweb.org/dev/2023-08-07#t1691382116891200): > That was apparently added 8 years ago > i vaguely remember some old issue with appspot URLs that I had to work around that appspot URL issue was probably that it required SNI for SSL, which was less supported then, and much more widely supported now, so I'm pretty sure this change is ok. cc @osa_k --- lib/helpers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/helpers.php b/lib/helpers.php index b96f324..c8d1df3 100644 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -41,7 +41,7 @@ function build_url($parsed_url) { function should_follow_redirects($url) { $host = parse_url($url, PHP_URL_HOST); - if(preg_match('/brid\.gy|appspot\.com|blogspot\.com|youtube\.com/', $host)) { + if(preg_match('/blogspot\.com|youtube\.com/', $host)) { return false; } else { return true; @@ -66,4 +66,4 @@ function allow_iframe_video($value = NULL) { $allow_iframe_video = $value; return $allow_iframe_video; -} \ No newline at end of file +}