Add Backup CSRF Token Fields to Registration Forms#1167
Merged
curtisdelicata merged 1 commit intomainfrom May 13, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request was created by Sweep to resolve the following request by @curtisdelicata:
Continue chatting at https://app.sweep.dev/c/b0846adc-c9bb-4538-956c-766eb4a45b52.
Purpose
Enhance security and form submission reliability by adding redundant CSRF protection to registration forms.
Description
This pull request adds an additional layer of CSRF protection to the registration forms by including hidden token fields. While Laravel's
@csrfdirective already provides CSRF protection, adding an explicit hidden token field serves as a backup mechanism and ensures compatibility with various client-side implementations.The changes affect two registration-related views:
auth/register.blade.php)register.blade.php)Each form now includes both the Laravel
@csrfdirective and an explicit hidden input field containing the CSRF token.Summary
_tokenfield toresources/views/auth/register.blade.php_tokenfield toresources/views/register.blade.php{{ csrf_token() }}to generate secure tokens