summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimo <simo>2005-07-01 01:17:50 +0200
committersimo <simo>2005-07-01 01:17:50 +0200
commit01be3a4893ec16321473d772db777bc710c9df66 (patch)
tree840a6cc8ee11b63c5697a403d0f15cf6d555fedb
parenta60eb05f133e5d23a860a2409c76d0b9665c6c7a (diff)
downloadaur-01be3a4893ec16321473d772db777bc710c9df66.tar.gz
aur-01be3a4893ec16321473d772db777bc710c9df66.tar.xz
Task #2838 - URL protocol checking to avoid broken links
-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 4faedd0b..e56335d9 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.
#