mirror of
https://git.lolcat.ca/lolcat/4get.git
synced 2024-11-08 17:43:07 -05:00
security fix shieet
This commit is contained in:
parent
38b97a26e5
commit
5b8c9eaed7
2 changed files with 63 additions and 54 deletions
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
/*
|
||||
this file exists to separate instance data from the actual about page
|
||||
HTML, and to make it easier to add/modify instances cleanly.
|
||||
*/
|
||||
|
||||
// this file exists to separate instance data from the actual about page
|
||||
// HTML, and to make it easier to add/modify instances cleanly.
|
||||
|
||||
$instancelist = [
|
||||
[
|
||||
"name" => "lolcat's instance (master)",
|
||||
|
@ -10,15 +10,17 @@ $instancelist = [
|
|||
"uri" => "https://4get.ca/",
|
||||
"displayname" => "4get.ca"
|
||||
],
|
||||
"altaddresses" => [ // all these address blocks will be linked in parentheses
|
||||
[ // e.g. 4get.ca (tor) (i2p) etc.
|
||||
"altaddresses" => [
|
||||
[
|
||||
// all these address blocks will be linked in parentheses
|
||||
// e.g. 4get.ca (tor) (i2p) etc.
|
||||
"uri" => "http://4getwebfrq5zr4sxugk6htxvawqehxtdgjrbcn2oslllcol2vepa23yd.onion",
|
||||
"displayname" => "tor"
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "zzls's instance",
|
||||
"name" => "zzls's Chilean instance",
|
||||
"address" => [
|
||||
"uri" => "https://4get.zzls.xyz/",
|
||||
"displayname" => "4get.zzls.xyz"
|
||||
|
@ -30,6 +32,19 @@ $instancelist = [
|
|||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "zzls's United States instance",
|
||||
"address" => [
|
||||
"uri" => "https://4getus.zzls.xyz/",
|
||||
"displayname" => "4getus.zzls.xyz"
|
||||
],
|
||||
"altaddresses" => [
|
||||
[
|
||||
"uri" => "http://4getus.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion",
|
||||
"displayname" => "tor"
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
"name" => "4get on a silly computer",
|
||||
"address" => [
|
||||
|
@ -42,6 +57,6 @@ $instancelist = [
|
|||
"displayname" => "fallback domain"
|
||||
]
|
||||
]
|
||||
],
|
||||
]
|
||||
]
|
||||
?>
|
|
@ -128,12 +128,9 @@ class proxy{
|
|||
}
|
||||
|
||||
// sanitize URL
|
||||
try{
|
||||
if($this->validateurl($url) === false){
|
||||
|
||||
$this->validateurl($url);
|
||||
}catch(Exception $error){
|
||||
|
||||
throw new Exception($error->getMessage());
|
||||
throw new Exception("Invalid URL");
|
||||
}
|
||||
|
||||
$this->clientcache();
|
||||
|
@ -353,12 +350,9 @@ class proxy{
|
|||
$this->format = $format;
|
||||
|
||||
// sanitize URL
|
||||
try{
|
||||
if($this->validateurl($url) === false){
|
||||
|
||||
$this->validateurl($url);
|
||||
}catch(Exception $error){
|
||||
|
||||
throw new Exception($error->getMessage());
|
||||
throw new Exception("Invalid URL");
|
||||
}
|
||||
|
||||
$this->clientcache();
|
||||
|
|
Loading…
Reference in a new issue