From 7c490448eca8f81e7f2275d994400ce32b87d199 Mon Sep 17 00:00:00 2001 From: thisgun Date: Fri, 30 Jan 2026 05:00:43 +0000 Subject: [PATCH] =?UTF-8?q?=EB=A9=94=EC=9D=BC=EB=B3=B4=EB=82=B4=EA=B8=B0?= =?UTF-8?q?=20=EB=B0=9C=EC=8B=A0=EC=9E=90=20=EC=9C=84=EC=9E=A5=20=EB=B0=A9?= =?UTF-8?q?=EC=A7=80=20=EB=B0=8F=20=EC=95=94=ED=98=B8=ED=99=94=20=ED=82=A4?= =?UTF-8?q?=EC=9D=98=20=EC=95=88=EC=A0=84=EC=84=B1=20=EC=B7=A8=EC=95=BD?= =?UTF-8?q?=EC=A0=90=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/formmail_send.php | 6 ++++++ install/install_db.php | 2 +- lib/common.lib.php | 12 +++++++++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/bbs/formmail_send.php b/bbs/formmail_send.php index 76fab9eea..635f4aca6 100644 --- a/bbs/formmail_send.php +++ b/bbs/formmail_send.php @@ -40,6 +40,12 @@ if ($type) { else $mail_content = $content; +// 환경설정에서 폼메일 사용 여부가 회원만 사용에 체크되어 있으면 +if ($config['cf_formmail_is_member']) { + $fnick = (isset($member['mb_nick']) && $member['mb_nick']) ? $member['mb_nick'] : $member['mb_name']; + $fmail = $member['mb_email']; +} + mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file); // 임시 첨부파일 삭제 diff --git a/install/install_db.php b/install/install_db.php index f2cba5b4c..7a143b5a6 100644 --- a/install/install_db.php +++ b/install/install_db.php @@ -158,7 +158,7 @@ if ($g5_install || $is_install === false) { cf_theme = 'basic', cf_admin = '$admin_id', cf_admin_email = '$admin_email', - cf_admin_email_name = '".G5_VERSION."', + cf_admin_email_name = '".G5_VERSION.'_'.substr(base_convert(mt_rand(), 10, 36), 0, 6)."', cf_use_point = '1', cf_use_copy_log = '1', cf_login_point = '100', diff --git a/lib/common.lib.php b/lib/common.lib.php index 291af89f3..e2ab98f32 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -3959,10 +3959,16 @@ class str_encrypt function __construct($salt='') { - if(!$salt) - $this->salt = md5(preg_replace('/[^0-9A-Za-z]/', substr(G5_MYSQL_USER, -1), $_SERVER['SERVER_SOFTWARE'].$_SERVER['DOCUMENT_ROOT'])); - else + global $config; + + if (!$salt) { + $config_hash = md5(serialize(array($config['cf_title'], $config['cf_theme'], $config['cf_admin_email_name'], $config['cf_login_point'], $config['cf_memo_send_point']))); + + //$this->salt = md5(preg_replace('/[^0-9A-Za-z]/', substr($config_hash, -1), $_SERVER['SERVER_SOFTWARE'].$config_hash.$_SERVER['DOCUMENT_ROOT'])); + $this->salt = hash('sha256', preg_replace('/[^0-9A-Za-z]/', substr($config_hash, -1), $_SERVER['SERVER_SOFTWARE'].$config_hash.$_SERVER['DOCUMENT_ROOT'])); + } else { $this->salt = $salt; + } $this->length = strlen($this->salt); }