Commit ecef4ff
committed
fix(auth): switch user edit to field allowlist
The edit() method passed $request->post() directly to User::update()
after unsetting only a few keys. This denylist approach allowed
injection of sensitive fields like role and api_token. Switching to
$request->only() ensures only explicitly listed profile fields can
be mass-assigned through this endpoint.1 parent 4ed25f4 commit ecef4ff
1 file changed
Lines changed: 9 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
819 | 819 | | |
820 | 820 | | |
821 | 821 | | |
822 | | - | |
823 | | - | |
824 | 822 | | |
825 | | - | |
| 823 | + | |
826 | 824 | | |
827 | 825 | | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
828 | 831 | | |
829 | 832 | | |
830 | 833 | | |
831 | 834 | | |
832 | 835 | | |
833 | 836 | | |
834 | 837 | | |
835 | | - | |
836 | | - | |
| 838 | + | |
| 839 | + | |
837 | 840 | | |
838 | 841 | | |
839 | | - | |
| 842 | + | |
840 | 843 | | |
841 | 844 | | |
842 | 845 | | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | 846 | | |
851 | 847 | | |
852 | 848 | | |
| |||
0 commit comments