mirror of
https://github.com/sigmasternchen/drnk.me
synced 2025-03-15 09:48:54 +00:00
fix: Add final . for domain lookup
This commit is contained in:
parent
541100e6ac
commit
099c85ef7b
1 changed files with 5 additions and 0 deletions
|
@ -36,6 +36,11 @@ function validateInput(string $url) {
|
||||||
$matches
|
$matches
|
||||||
);
|
);
|
||||||
$hostname = $matches[1] ?? null;
|
$hostname = $matches[1] ?? null;
|
||||||
|
if ($hostname[strlen($hostname) - 1] != ".") {
|
||||||
|
// add . so DNS lookup won't fail
|
||||||
|
$hostname .= ".";
|
||||||
|
}
|
||||||
|
|
||||||
$matches = [];
|
$matches = [];
|
||||||
preg_match(
|
preg_match(
|
||||||
"/^.*?:\/\/([0-9:.]+).*$/",
|
"/^.*?:\/\/([0-9:.]+).*$/",
|
||||||
|
|
Loading…
Reference in a new issue