mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed faulty redirect
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
if(isset($_GET['chan'])) header('Location: '.$_GET['chan']);
|
if(isset($_GET['chan'])) {header('Location: '.$_GET['chan']); exit;}
|
||||||
$list = explode("/", htmlspecialchars(strtolower($_SERVER["REQUEST_URI"])));
|
$list = explode("/", htmlspecialchars(strtolower($_SERVER["REQUEST_URI"])));
|
||||||
if($list[1]==""||!isset($list[1])||count($list)<=1){$list="";include('php/nochan.php');die();}
|
if($list[1]==""||!isset($list[1])||count($list)<=1){$list="";include('php/nochan.php');die();}
|
||||||
else if ($list[1] != preg_replace('/[^\da-z]/i', '', urldecode($list[1]))){
|
else if ($list[1] != preg_replace('/[^\da-z]/i', '', urldecode($list[1]))){
|
||||||
header('Location: ../'.preg_replace('/[^\da-z]/i', '', urldecode($list[1])));
|
header('Location: ../'.preg_replace('/[^\da-z?=]/i', '', urldecode($list[1])));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else $list=$list[1];
|
else $list=$list[1];
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ $guid=substr(base64_encode(crc32($_SERVER['HTTP_USER_AGENT'].$_SERVER['REMOTE_AD
|
|||||||
//save or delete(oid) //getting the list we are in
|
//save or delete(oid) //getting the list we are in
|
||||||
$list = explode("/", htmlspecialchars(strtolower($_SERVER["REQUEST_URI"])));
|
$list = explode("/", htmlspecialchars(strtolower($_SERVER["REQUEST_URI"])));
|
||||||
if($list[1]==""||!isset($list[1])||count($list)<=1)$list="videos";
|
if($list[1]==""||!isset($list[1])||count($list)<=1)$list="videos";
|
||||||
else $list = preg_replace('/[^\da-z]/i', '', urldecode($list[1]));
|
else $list = preg_replace('/[^\da-z=?]/i', '', urldecode($list[1]));
|
||||||
|
|
||||||
$list="../lists/".$list.".json"; //actually setting the list for the target. Under is the array for an empty list being created
|
$list="../lists/".$list.".json"; //actually setting the list for the target. Under is the array for an empty list being created
|
||||||
$array = array("nowPlaying" => array("30H2Z8Lr-4c" => array("id" => "30H2Z8Lr-4c", "title" => "Empty Channel, search to add a video")), "songs" => array(), "conf" => array("startTime" => time(), "views" => array(), "skips" => array(), "vote" => "false", "addsongs" => "false", "longsongs" => "true", "frontpage" => "true", "allvideos" => "true", "removeplay" => "false", "adminpass" => ""));
|
$array = array("nowPlaying" => array("30H2Z8Lr-4c" => array("id" => "30H2Z8Lr-4c", "title" => "Empty Channel, search to add a video")), "songs" => array(), "conf" => array("startTime" => time(), "views" => array(), "skips" => array(), "vote" => "false", "addsongs" => "false", "longsongs" => "true", "frontpage" => "true", "allvideos" => "true", "removeplay" => "false", "adminpass" => ""));
|
||||||
|
|||||||
Reference in New Issue
Block a user