Skip to content

Ensure email is included in state #1309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2023
Merged

Conversation

antja0
Copy link
Contributor

@antja0 antja0 commented May 8, 2023

If email is hidden for serialization (in the User model hidden array) the view will crash, as toArray() won't include the email.

Hiding email field in particular is useful to avoid accidentally exposing other users emails to the frontend / client.

antja0 and others added 2 commits May 8, 2023 17:08
If email is hidden for serialization the view will crash, as toArray() won't include the email.

Hiding email field in particular is useful if application contains any API endpoints or livewire components that handle users - to not accidentally expose other users emails to the client.
@taylorotwell taylorotwell merged commit afe6aa5 into laravel:master May 8, 2023
taylorotwell added a commit that referenced this pull request May 8, 2023
taylorotwell added a commit that referenced this pull request May 8, 2023
@taylorotwell
Copy link
Member

Wrong branch. Send to 3.x.

@antja0 antja0 deleted the patch-1 branch May 8, 2023 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants