This commit is contained in:
Friendika 2011-07-17 21:34:02 -07:00
parent 1fa2231c20
commit f3bd216112
2 changed files with 24 additions and 20 deletions

View file

@ -1,9 +1,5 @@
<?php <?php
set_time_limit(0);
ini_set('pcre.backtrack_limit', 250000);
define ( 'FRIENDIKA_VERSION', '2.2.1044' ); define ( 'FRIENDIKA_VERSION', '2.2.1044' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1075 ); define ( 'DB_UPDATE_VERSION', 1075 );
@ -179,20 +175,28 @@ define ( 'GRAVITY_COMMENT', 6);
* *
*/ */
if (get_magic_quotes_gpc()) { function startup() {
$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST); error_reporting(E_ERROR | E_WARNING | E_PARSE);
while (list($key, $val) = each($process)) { set_time_limit(0);
foreach ($val as $k => $v) { ini_set('pcre.backtrack_limit', 250000);
unset($process[$key][$k]);
if (is_array($v)) {
$process[$key][stripslashes($k)] = $v; if (get_magic_quotes_gpc()) {
$process[] = &$process[$key][stripslashes($k)]; $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
} else { while (list($key, $val) = each($process)) {
$process[$key][stripslashes($k)] = stripslashes($v); foreach ($val as $k => $v) {
} unset($process[$key][$k]);
} if (is_array($v)) {
} $process[$key][stripslashes($k)] = $v;
unset($process); $process[] = &$process[$key][stripslashes($k)];
} else {
$process[$key][stripslashes($k)] = stripslashes($v);
}
}
}
unset($process);
}
} }
/* /*
@ -260,6 +264,8 @@ class App {
$this->query_string = ''; $this->query_string = '';
startup();
$this->scheme = ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'])) ? 'https' : 'http' ); $this->scheme = ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'])) ? 'https' : 'http' );
if(x($_SERVER,'SERVER_NAME')) { if(x($_SERVER,'SERVER_NAME')) {

View file

@ -1,7 +1,5 @@
<?php <?php
error_reporting(E_ERROR | E_WARNING | E_PARSE);
/** /**
* *
* Friendika * Friendika