- Popup/banner quảng cáo cấu hình từ admin (loại, link, lịch hiển thị) - Đặt lại mật khẩu: token 80 ký tự kèm check digit Luhn thay cho token+email lộ trong URL, chỉ lưu bản băm, một lần dùng, hết hạn 60 phút - Xác thực 2 lớp qua email khi đăng nhập (mã 6 số, ghi nhớ thiết bị 90 ngày) - ApiAuthCheck chặn ngay tài khoản bị khoá dù JWT còn hạn (trước đây dùng được tới hết TTL) - Handler trả 404 thay vì 500 khi ModelNotFoundException không bọc HttpException - Test ClientTamperingTest: xác nhận IDOR/giả mạo dữ liệu từ client đều bị chặn Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
35 lines
789 B
PHP
35 lines
789 B
PHP
<?php
|
|
|
|
namespace App\Mail\Customer;
|
|
|
|
use App\Mail\TemplateMailable;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class TwoFactorCode extends TemplateMailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
public function __construct(public array $data) {}
|
|
|
|
public function attachments(): array
|
|
{
|
|
return [];
|
|
}
|
|
|
|
protected function scenario(): string
|
|
{
|
|
return 'customer_two_factor_code';
|
|
}
|
|
|
|
protected function variables(): array
|
|
{
|
|
return [
|
|
'full_name' => $this->data['fullname'] ?? 'Quý khách',
|
|
'verify_code' => $this->data['code'],
|
|
'otp_purpose' => $this->data['purpose'],
|
|
'expire_minutes' => (string) $this->data['expire_minutes'],
|
|
];
|
|
}
|
|
}
|