Update AP Helpers

This commit is contained in:
Daniel Supernault 2019-04-01 18:26:15 -06:00
parent 52863d81e6
commit 0ecb4133d5
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 4 additions and 0 deletions

View File

@ -135,6 +135,10 @@ class Helpers {
'127.0.0.1', 'localhost', '::1' '127.0.0.1', 'localhost', '::1'
]; ];
if(mb_substr($url, 0, 8) !== 'https://') {
return false;
}
$valid = filter_var($url, FILTER_VALIDATE_URL); $valid = filter_var($url, FILTER_VALIDATE_URL);
if(in_array(parse_url($valid, PHP_URL_HOST), $localhosts)) { if(in_array(parse_url($valid, PHP_URL_HOST), $localhosts)) {