mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-07-12 10:30:17 +00:00
Allow external BIND URL to be file:///
This allows us to load in external files that are copied onto the Davical server via other means.
This commit is contained in:
parent
642524d391
commit
a7b316a004
@ -48,7 +48,7 @@ if ( $destination->Exists() ) {
|
||||
}
|
||||
|
||||
// external binds shouldn't ever point back to ourselves but they should be a valid http[s] url
|
||||
if ( preg_match ( '{^https?://([^/]+)(:[0-9]\+)?/.+$}', $href, $matches )
|
||||
if ( preg_match ( '{^(?:https?://|file:///)([^/]+)(:[0-9]\+)?/.+$}', $href, $matches )
|
||||
&& strcasecmp( $matches[0], 'localhost' ) !== 0 && strcasecmp( $matches[0], '127.0.0.1' ) !== 0
|
||||
&& strcasecmp( $matches[0], $_SERVER['SERVER_NAME'] ) !== 0 && strcasecmp( $matches[0], $_SERVER['SERVER_ADDR'] ) !== 0 ) {
|
||||
require_once('external-fetch.php');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user