path traversal exploit (this is what you get for using free software)
This commit is contained in:
parent
36b0c570aa
commit
b2203804c7
|
@ -15,7 +15,12 @@ class favicon{
|
|||
|
||||
header("Content-Type: image/png");
|
||||
|
||||
if(substr_count($url, "/") !== 2){
|
||||
if(
|
||||
preg_match(
|
||||
'/^https?:\/\/[A-Za-z0-9.-]+$/',
|
||||
$url
|
||||
) === 0
|
||||
){
|
||||
|
||||
header("X-Error: Only provide the protocol and domain");
|
||||
$this->defaulticon();
|
||||
|
|
Loading…
Reference in New Issue