Esempio n. 1
0
    }
    $cont = serialize($conf_save);
    FileCtl::make_datafile($_conf['conf_user_file'], $_conf['conf_user_perm']);
    if (FileCtl::file_write_contents($_conf['conf_user_file'], $cont) === false) {
        $dispname = '$_conf[\'pref_dir\']/' . basename($_conf['conf_user_file']);
        p2die("ユーザー設定ファイル {$dispname} に書き込めませんでした。");
    }
}
// }}}
// {{{ ホストチェック
if (!($_conf['secure']['auth_host_only_http'] && !empty($_SERVER['HTTPS']))) {
    if ($_conf['secure']['auth_host'] && !HostCheck::getHostAuth()) {
        HostCheck::forbidden();
    }
    if ($_conf['secure']['auth_bbq'] && HostCheck::getHostBurned()) {
        HostCheck::forbidden();
    }
}
// }}}
// {{{ リクエスト変数の検証と文字コード変換
/**
 * 日本語を入力する可能性のあるフォームには隠し要素で
 * エンコーディング判定用の文字列を仕込んでいる
 *
 * $_COOKIE は $_REQUEST に含めない
 */
if (!empty($_GET) || !empty($_POST)) {
    $hint = null;
    // NULLバイトアタックとスクリプトインジェクションの検証、
    // エンコーディング判定用文字列の取得
    if (!empty($_POST)) {