This commit is contained in:
神楽坂 白 2023-11-07 09:20:59 +08:00
parent 31e4e3e660
commit 1d24a03dd2

View File

@ -30,6 +30,7 @@ public function index(Request $request)
public function get(Request $request) public function get(Request $request)
{ {
$email = $request->input('email'); $email = $request->input('email');
$email = strtolower($email);
$key = $request->input('key', ''); $key = $request->input('key', '');
$validator = Validator::make($request->all(), [ $validator = Validator::make($request->all(), [
@ -104,8 +105,8 @@ function ($attribute, $value, $fail) {
'code' => 1, 'code' => 1,
'msg' => '', 'msg' => '',
'data' => [ 'data' => [
'list' => $new_email_list, 'list' => $new_email_list,
'new_key' => Crypt::encryptString(json_encode($key)), 'new_key' => Crypt::encryptString(json_encode($key)),
], ],
]); ]);
} }
@ -128,7 +129,7 @@ public function put(Request $request)
$mail->from = $from; $mail->from = $from;
$mail->from_hash = hash('sha256', $from); $mail->from_hash = hash('sha256', $from);
$mail->to = $to; $mail->to = strtolower($to);
$mail->to_hash = hash('sha256', $to); $mail->to_hash = hash('sha256', $to);
$mail->title = $title; $mail->title = $title;