Skip to content

Commit

Permalink
Turn off autocomplete for csrf_field (#48371)
Browse files Browse the repository at this point in the history
* Turn off autocomplete

* Update helpers.php

---------

Co-authored-by: Max Heckel <[email protected]>
Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
3 people authored Sep 14, 2023
1 parent 0b13338 commit b6f4732
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ function cookie($name = null, $value = null, $minutes = 0, $path = null, $domain
*/
function csrf_field()
{
return new HtmlString('<input type="hidden" name="_token" value="'.csrf_token().'">');
return new HtmlString('<input type="hidden" name="_token" value="'.csrf_token().'" autocomplete="off">');
}
}

Expand Down

0 comments on commit b6f4732

Please sign in to comment.