From 1d24a03dd2c75cc8484ed75b0318cca4281021d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E6=A5=BD=E5=9D=82=20=E7=99=BD?= Date: Tue, 7 Nov 2023 09:20:59 +0800 Subject: [PATCH] fixbug --- app/Http/Controllers/MailController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/MailController.php b/app/Http/Controllers/MailController.php index b51500d..8e5964c 100644 --- a/app/Http/Controllers/MailController.php +++ b/app/Http/Controllers/MailController.php @@ -30,6 +30,7 @@ public function index(Request $request) public function get(Request $request) { $email = $request->input('email'); + $email = strtolower($email); $key = $request->input('key', ''); $validator = Validator::make($request->all(), [ @@ -104,8 +105,8 @@ function ($attribute, $value, $fail) { 'code' => 1, 'msg' => '', 'data' => [ - 'list' => $new_email_list, - 'new_key' => Crypt::encryptString(json_encode($key)), + 'list' => $new_email_list, + 'new_key' => Crypt::encryptString(json_encode($key)), ], ]); } @@ -128,7 +129,7 @@ public function put(Request $request) $mail->from = $from; $mail->from_hash = hash('sha256', $from); - $mail->to = $to; + $mail->to = strtolower($to); $mail->to_hash = hash('sha256', $to); $mail->title = $title;