Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复自定义的session.prefix导致图形验证码验证时,验证码不正确问题 #35

Open
wants to merge 1 commit into
base: 2.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Captcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace think\captcha;

use think\facade\Config;
use think\facade\Session;

class Captcha
Expand Down Expand Up @@ -198,7 +199,7 @@ public function entry($id = '')
$secode = [];
$secode['verify_code'] = $code; // 把校验码保存到session
$secode['verify_time'] = time(); // 验证码创建时间
Session::set($key . $id, $secode, '');
Session::set($key . $id, $secode, Config::pull('session.prefix'));

ob_start();
// 输出图像
Expand Down