~jan0sch/smederee

Showing details for patch fa61404699f43aa7e3760793a6efa493ffebf634.
2022-12-29 (Thu), 6:40 PM - Jens Grassel - fa61404699f43aa7e3760793a6efa493ffebf634

Remove randomised id attribute for CSRF form field.

It complicates testing and is not needed because the name attribute is
sufficient.
Summary of changes
1 files modified with 1 lines added and 1 lines removed
  • modules/hub/src/main/twirl/de/smederee/hub/views/csrfToken.scala.html with 1 added and 1 removed lines
diff -rN -u old-smederee/modules/hub/src/main/twirl/de/smederee/hub/views/csrfToken.scala.html new-smederee/modules/hub/src/main/twirl/de/smederee/hub/views/csrfToken.scala.html
--- old-smederee/modules/hub/src/main/twirl/de/smederee/hub/views/csrfToken.scala.html	2025-02-01 06:46:16.423770359 +0000
+++ new-smederee/modules/hub/src/main/twirl/de/smederee/hub/views/csrfToken.scala.html	2025-02-01 06:46:16.423770359 +0000
@@ -1,2 +1,2 @@
 @(csrf: Option[CsrfToken])
-<input type="hidden" id="@Constants.csrfCookieName-@{scala.util.Random.alphanumeric.take(4).mkString}" name="@Constants.csrfCookieName" value="@csrf">
+<input type="hidden" name="@Constants.csrfCookieName" value="@csrf">