Files
mrbs-equbao-2026/等保二级整改部署包_20260908/patch/config.inc.php
T
人事系统开发 48092cab42
Docker image / push (push) Canceled after 0s
MRBS 1.12.2 等保2.0二级整改完整提交
包含:登录失败锁定、90天密码有效期、30分钟会话超时、
强制改密、登录审计日志、屏幕水印、企业背景图、
备案信息固定底部、favicon、登录页JS修复等全部改动
2026-09-08 21:19:47 +08:00

131 lines
4.9 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
declare(strict_types=1);
namespace MRBS;
use IntlDateFormatter;
require_once 'lib/autoload.inc';
/**************************************************************************
* MRBS 配置文件(精简完整版)
* 仅保留必要配置 + 您的自定义设置
**************************************************************************/
/**********
* 时区与语言
**********/
$timezone = "Asia/Shanghai";
$override_locale = 'zh-CN';
/*******************
* 数据库设置
*******************/
$dbsys = "mysql";
$db_host = "localhost";
$db_database = "hotel";
$db_login = "hotel";
$db_password = 'i4wt5yn2'; // ← 请替换为实际数据库密码
$db_tbl_prefix = "mrbs_";
$db_persist = false;
/* ====================== 以下为自定义配置 ====================== */
$mrbs_company = "LZOLJ";
$vocab_override['zh']['mrbs'] = "会议预定系统V1.11.6";
/**********************************************
* 邮件设置(企业163 SMTP)
**********************************************/
$mail_settings = [
'from' => 'admin@hi-luzhou-lj.com',
'use_from_for_all_mail' => true,
'use_reply_to' => true,
'organizer' => 'admin@hi-luzhou-lj.com',
'recipients' => 'admin@hi-luzhou-lj.com',
'cc' => '',
'treat_cc_as_to' => false,
'admin_on_bookings' => false,
'area_admin_on_bookings'=> true,
'room_admin_on_bookings'=> true,
'booker' => false, // 改成 true 可让预订者本人也收到邮件
'on_new' => true,
'on_change' => false,
'on_delete' => false,
'allow_no_mail' => false,
'no_mail_default' => false,
'details' => false,
'html' => false,
'icalendar' => false,
'admin_lang' => 'zh',
'admin_backend' => 'smtp',
];
/*******************
* SMTP 设置
*******************/
$smtp_settings = [
'host' => 'smtphz.qiye.163.com',
'port' => 465,
'auth' => true,
'secure' => 'ssl',
'username' => 'admin@hi-luzhou-lj.com',
'password' => 'NwxJ%fNmLguah%k2', // ← 请替换为实际 SMTP 密码
'hostname' => '',
'helo' => '',
'disable_opportunistic_tls' => false,
'ssl_verify_peer' => true,
'ssl_verify_peer_name' => true,
'ssl_allow_self_signed' => false,
];
/* ====================== 推荐附加设置 ====================== */
// 认证方式(最常用)
$auth['type'] = 'db';
// 默认显示区域和房间(根据您实际的 area_id 和 room_id 修改)
$default_area = 1;
$default_room = 1;
// 最大重复预订天数(1年)
$max_rep_interval = 365;
// 其他常用优化(可按需取消注释)
// $refresh_rate = 0; // 关闭自动刷新
// $enable_periods = false; // 使用时间段模式(而非分钟)
/* ====================== 等保二级整改配置(2026-09-08) ====================== */
// ---- C1: 口令复杂度策略 ----
// MRBS 1.12 内建校验框架:管理端设密(edit_users.php)、自助重置均自动执行本策略
$pwd_policy = [
'length' => 8, // 最小长度 8 位
'lower' => 1, // 至少 1 个小写字母
'upper' => 1, // 至少 1 个大写字母
'numeric' => 1, // 至少 1 个数字
'special' => 1, // 至少 1 个特殊字符
];
// ---- C2: 会话超时(登录连接超时自动退出)----
// 使用默认 'php' session 方案($auth['session'] 未单独设置)
$auth['session_php']['session_name'] = 'MRBS_SESSID'; // 会话名
$auth['session_php']['session_expire_time'] = 12 * 60 * 60; // 绝对过期:12 小时(原默认 30 天)
$auth['session_php']['inactivity_expire_time'] = 30 * 60; // 空闲 30 分钟自动退出(原默认 0 = 永不)
// ---- C6: 禁止匿名访问(全站必须登录)----
// 官方机制:所有页面最低访问级别提升为需登录;忘记密码流程除外;需确认 kiosk 模式未启用
$auth['deny_public_access'] = true;
// ---- 屏幕水印开关(防截图泄密溯源;配合 Themes/default/header.inc 输出)----
$watermark_enabled = true;
// ---- 代码改造参数(登录锁定 / 口令有效期 / 审计日志)----
// 配套代码:lib/MRBS/Auth/AuthDb.php、lib/MRBS/Session/SessionWithLogin.php、
// lib/MRBS/Audit.php、change_password.php
$login_lock_threshold = 5; // 连续登录失败阈值(次),达到后临时锁定
$login_lock_duration = 15 * 60; // 锁定时间(秒)= 15 分钟
$pwd_max_age = 90 * 24 * 60 * 60; // 口令最长有效期(秒)= 90 天
$audit_log_file = __DIR__ . '/audit/security_audit.log'; // 安全审计日志文件