projects
/
php
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6132f85
)
# check link() as well
author
Rasmus Lerdorf
<rasmus@php.net>
Sun, 28 Nov 1999 16:35:26 +0000
(16:35 +0000)
committer
Rasmus Lerdorf
<rasmus@php.net>
Sun, 28 Nov 1999 16:35:26 +0000
(16:35 +0000)
ext/standard/link.c
patch
|
blob
|
history
diff --git
a/ext/standard/link.c
b/ext/standard/link.c
index 077d63c524b9cab59de3853e5e57f0ebda02c8e8..9ccf0ecdda382c9808f2d45ec0745b73a3773f11 100644
(file)
--- 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) {