Task #2838 - URL protocol checking to avoid broken links

This commit is contained in:
simo 2005-06-30 23:17:50 +00:00
parent a60eb05f13
commit 01be3a4893

View file

@ -293,6 +293,12 @@ if ($_COOKIE["AURSID"]) {
# included files match?, install scriptlet file exists? # included files match?, install scriptlet file exists?
# #
# Check for http:// or other protocol in url
#
$parsed_url = parse_url($pkgbuild['url']);
if (!$parsed_url['scheme']) {
$error = __("Package URL is missing a protocol (ie. http:// ,ftp://)");
}
# Now, run through the pkgbuild array and do any $pkgname/$pkgver # Now, run through the pkgbuild array and do any $pkgname/$pkgver
# substituions. # substituions.