diff options
author | Rasmus Lerdorf <rasmus@php.net> | 1999-11-28 16:35:26 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 1999-11-28 16:35:26 +0000 |
commit | 7cefad61ede71f567de3132b9788d4b763d7b51b (patch) | |
tree | 701f56072c3bb000c6b2282dbd3c6aa437841ebd | |
parent | 6132f85c8d48dcd7485777e64d1eb0fd39387712 (diff) | |
download | php-git-7cefad61ede71f567de3132b9788d4b763d7b51b.tar.gz |
# check link() as well
-rw-r--r-- | ext/standard/link.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/standard/link.c b/ext/standard/link.c index 077d63c524..9ccf0ecdda 100644 --- a/ext/standard/link.c +++ b/ext/standard/link.c @@ -149,6 +149,10 @@ PHP_FUNCTION(link) if (PG(safe_mode) && !_php3_checkuid((*topath)->value.str.val, 2)) { RETURN_FALSE; } + if (!strncasecmp((*topath)->value.str.val,"http://",7) || !strncasecmp((*topath)->value.str.val,"ftp://",6)) { + php_error(E_WARNING, "Unable to link to a URL"); + RETURN_FALSE; + } ret = link((*topath)->value.str.val, (*frompath)->value.str.val); if (ret == -1) { |