Browse Source

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
pull/119/head
Ryan Barrett 1 year ago
parent
commit
c247379ccd
No known key found for this signature in database GPG Key ID: 6BE31FDF4776E9D4
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      lib/helpers.php

+ 2
- 2
lib/helpers.php View File

@ -41,7 +41,7 @@ function build_url($parsed_url) {
function should_follow_redirects($url) { function should_follow_redirects($url) {
$host = parse_url($url, PHP_URL_HOST); $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; return false;
} else { } else {
return true; return true;
@ -66,4 +66,4 @@ function allow_iframe_video($value = NULL) {
$allow_iframe_video = $value; $allow_iframe_video = $value;
return $allow_iframe_video; return $allow_iframe_video;
}
}

Loading…
Cancel
Save