• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Error on creating new page by admin panel

Status
Not open for further replies.

Diazapam

!ROFLMAO!
Joined
Jul 29, 2009
Messages
1,411
Reaction score
9
Location
$_GET['Country']
If you create a new page on admin panel and you try to put code inside it you get this error:
Also if you edit a page that has content it will become empty again <_<
errorhr.jpg
 
Yes I see, someone changed security.php on SVN.

Replace it with this one:

PHP:
<?php 

function __sql_regcase($string){
        $max = strlen($string);
        $ret = '';
        for ($i = 0; $i < $max; $i++) {
                $char   = substr($string,$i,1);
                $up     = strtoupper($char);
                $low    = strtolower($char);
                $ret    .=($up != $low) ? '[' . $up . $low . ']' : $char;
        }
        
        return $ret;
} 
function escape($data) {
        $data = preg_replace(__sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"),"", $data);
        return $data;
}

foreach($_POST as $key=>$value) {
        $_POST[$key.'Original'] = $value;
        $_POST[$key] = escape($value);
}
if($config['engine']['enable_query_strings']) {
        foreach($_GET as $key=>$value) {
                $_GET[$key] = escape($value);
        }
        $_REQUEST = array_merge($_GET, $_POST);
} else {
        $_REQUEST = $_POST;
}


?>
 
Status
Not open for further replies.
Back
Top