Changeset 19760
- Timestamp:
- 2010/12/25 14:31:06 (12 years ago)
- Location:
- branches/version-2_5-dev
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/SC_Initial.php
r19738 r19760 59 59 $this->mbstringInit(); 60 60 $this->createCacheDir(); 61 $this->stripslashesDeepGpc(); 61 62 $this->resetSuperglobalsRequest(); 62 63 } … … 319 320 320 321 /** 322 * クォートされた文字列のクォート部分を再帰的に取り除く 323 * 324 * {@link http://jp2.php.net/manual/ja/function.get-magic-quotes-gpc.php PHP Manual} の記事を参考に実装。 325 * $_REQUEST は後続の処理で再構成されるため、本処理では外している。 326 * @return void 327 */ 328 function stripslashesDeepGpc() { 329 // Strip magic quotes from request data. 330 if (get_magic_quotes_gpc()) { 331 // Create lamba style unescaping function (for portability) 332 $quotes_sybase = strtolower(ini_get('magic_quotes_sybase')); 333 $unescape_function = (empty($quotes_sybase) || $quotes_sybase === 'off') ? 'stripslashes($value)' : 'str_replace("\'\'","\'",$value)'; 334 $stripslashes_deep = create_function('&$value, $fn', ' 335 if (is_string($value)) { 336 $value = ' . $unescape_function . '; 337 } else if (is_array($value)) { 338 foreach ($value as &$v) $fn($v, $fn); 339 } 340 '); 341 342 // Unescape data 343 $stripslashes_deep($_POST, $stripslashes_deep); 344 $stripslashes_deep($_GET, $stripslashes_deep); 345 $stripslashes_deep($_COOKIE, $stripslashes_deep); 346 } 347 } 348 349 /** 321 350 * スーパーグローバル変数「$_REQUEST」を再セット 322 351 * -
branches/version-2_5-dev/html/install/index.php
r19754 r19760 434 434 if (ini_get('safe_mode')) { 435 435 $mess .= ">> ×:PHPのセーフモードが有効になっています。<br>"; 436 $hasErr = true; 437 } 438 439 if (get_magic_quotes_gpc()) { 440 $mess .= ">> ×:PHPの設定ディレクティブ「magic_quotes_gpc」が有効になっています。<br>"; 436 441 $hasErr = true; 437 442 }
Note: See TracChangeset
for help on using the changeset viewer.