← PHP / Laravel · 目次

PHP-076 / 中級

全リクエスト(Input::all)のログ記録、パスワードを含む

A09:2021 Security Logging and Monitoring Failures · CWE-532 Sensitive Info in Log

なぜ問題になるのか?

ログ収集システムへのアクセス者がパスワードを閲覧できます。

修正方法

php
Log::debug('request', $request->except(['password', 'password_confirmation', 'token']));

参考資料