• R/O
  • HTTP
  • SSH
  • HTTPS

nucleus-jp-ancient: Commit

Nucleus CMS日本語版SVNをgit-svnしたもの。リポジトリの変換作業用


Commit MetaInfo

Revision47eeac84a3570b0803869e5ea3a4dfa2c8e541eb (tree)
Zeit2009-03-17 05:59:41
Autorkmorimatsu <kmorimatsu@1ca2...>
Commiterkmorimatsu

Log Message

$CONF['DisableEncodingCheck'] for encoding_check function.
Only check $_GET and $_POST by encoding_check() to avoid problem using special characters in $_SERVER and $_COOKIE.

git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk/utf8@977 1ca29b6e-896d-4ea0-84a5-967f57386b96

Ändern Zusammenfassung

Diff

--- a/nucleus/libs/globalfunctions.php
+++ b/nucleus/libs/globalfunctions.php
@@ -336,7 +336,7 @@ include($DIR_LANG . ereg_replace( '[\\|/]', '', $language) . '.php');
336336
337337 // check if valid charset
338338 if (!encoding_check(false, false, _CHARSET)) {
339- foreach(array($_REQUEST, $_SERVER) as $input) {
339+ foreach(array($_GET, $_POST) as $input) {
340340 array_walk($input, 'encoding_check');
341341 }
342342 }
@@ -588,7 +588,7 @@ function sendContentType($contenttype, $pagetype = '', $charset = _CHARSET) {
588588
589589 // check if valid charset
590590 if (!encoding_check(false,false,$charset)) {
591- foreach(array($_REQUEST, $_SERVER) as $input) {
591+ foreach(array($_GET, $_POST) as $input) {
592592 array_walk($input, 'encoding_check');
593593 }
594594 }
@@ -1546,6 +1546,12 @@ function formatDate($format, $timestamp, $defaultFormat, &$blog) {
15461546
15471547 function encoding_check($val, $key, $encoding=false, $exclude=false) {
15481548 /*
1549+ Set $CONF['DisableEncodingCheck']=1 only for special occasion, e.g. install script.
1550+ Don't set this permanently in nucleus_config table.
1551+ */
1552+ global $CONF;
1553+ if (!empty($CONF['DisableEncodingCheck'])) return true;
1554+ /*
15491555 When 3rd argument is set, return if checked already.
15501556 When 4th argument is set, set the excluded key(s).
15511557 */
Show on old repository browser