diff options
| -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 b6071d4c09..077d63c524 100644 --- a/ext/standard/link.c +++ b/ext/standard/link.c @@ -116,6 +116,10 @@ PHP_FUNCTION(symlink) 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 symlink to a URL"); + RETURN_FALSE; + } ret = symlink((*topath)->value.str.val, (*frompath)->value.str.val); if (ret == -1) { |
