summaryrefslogtreecommitdiffstats
path: root/web/html
diff options
context:
space:
mode:
authorsimo <simo>2005-06-30 23:17:50 +0000
committersimo <simo>2005-06-30 23:17:50 +0000
commit01be3a4893ec16321473d772db777bc710c9df66 (patch)
tree840a6cc8ee11b63c5697a403d0f15cf6d555fedb /web/html
parenta60eb05f133e5d23a860a2409c76d0b9665c6c7a (diff)
downloadaurweb-01be3a4893ec16321473d772db777bc710c9df66.tar.xz
Task #2838 - URL protocol checking to avoid broken links
Diffstat (limited to 'web/html')
-rw-r--r--web/html/pkgsubmit.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 4faedd0..e56335d 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -292,8 +292,14 @@ if ($_COOKIE["AURSID"]) {
# performed. Examples: #md5sums == #sources?, md5sums of any
# 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
# substituions.
#