Open octopop opened 1 year ago
Hi if possible, please submit a pull request!
Interesting. So Cloudflare will return an JSON response if it's down, and seemingly with a HTTP response code of 200.
Ahhhh I see, that's why my patch fix of catching the HTTP response code didn't work last time on issue #44.
Anyways, just wanna say that ensuring $old_ip
is valid should effectively clear out the infamous double Discord webhook bug here.
Cloudflare API is down today and as a result at random returns the following instead of the IP address:
{"success":false,"errors":[{"code":10000,"message":"Internal authentication error: internal server error"}]}
The causes
$old_ip == $ip
to fail and force a IP update.FIX: Sanitize and ensure that the returned string from the API call is actually an IP before comparing. Suggested snippet below adds a comparison to ensure
$old_ip
is a valid IP first: