From e19ded1362a231376e21fdf65325440e49e5e9da Mon Sep 17 00:00:00 2001 From: swaggboi Date: Thu, 15 Aug 2024 20:24:31 -0400 Subject: [PATCH] Added CSRF fields to mod/admin templates --- templates/moderator/admin_reset.html.ep | 1 + templates/moderator/create.html.ep | 1 + templates/moderator/demote.html.ep | 1 + templates/moderator/lock_acct.html.ep | 1 + templates/moderator/login.html.ep | 5 +++-- templates/moderator/mod_reset.html.ep | 1 + templates/moderator/promote.html.ep | 1 + templates/moderator/unlock_acct.html.ep | 1 + 8 files changed, 10 insertions(+), 2 deletions(-) diff --git a/templates/moderator/admin_reset.html.ep b/templates/moderator/admin_reset.html.ep index a0027c3..a6260ed 100644 --- a/templates/moderator/admin_reset.html.ep +++ b/templates/moderator/admin_reset.html.ep @@ -18,5 +18,6 @@ <%= label_for password => 'Password' %> <%= password_field password => (id => 'password') %> + <%= csrf_field %> diff --git a/templates/moderator/create.html.ep b/templates/moderator/create.html.ep index 9b471a1..7ca1eeb 100644 --- a/templates/moderator/create.html.ep +++ b/templates/moderator/create.html.ep @@ -26,5 +26,6 @@ <%= label_for password => 'Password' %> <%= password_field password => (id => 'password') %> + <%= csrf_field %> diff --git a/templates/moderator/demote.html.ep b/templates/moderator/demote.html.ep index df279b4..742548e 100644 --- a/templates/moderator/demote.html.ep +++ b/templates/moderator/demote.html.ep @@ -10,5 +10,6 @@ <%= label_for email => 'Email' %> <%= email_field email => (id => 'email', autofocus => undef) %> + <%= csrf_field %> diff --git a/templates/moderator/lock_acct.html.ep b/templates/moderator/lock_acct.html.ep index c487e16..c8db1c1 100644 --- a/templates/moderator/lock_acct.html.ep +++ b/templates/moderator/lock_acct.html.ep @@ -10,5 +10,6 @@ <%= label_for email => 'Email' %> <%= email_field email => (id => 'email', autofocus => undef) %> + <%= csrf_field %> diff --git a/templates/moderator/login.html.ep b/templates/moderator/login.html.ep index 53de7e4..9e83a3a 100644 --- a/templates/moderator/login.html.ep +++ b/templates/moderator/login.html.ep @@ -12,11 +12,12 @@
<% if (my $error = validation->error('password')) { =%> -

Must be between <%= $error->[2] %> - and <%= $error->[3] %> characters.

+

Must be atleast <%= $error->[2] %> + characters.

<% } =%> <%= label_for password => 'Password' %> <%= password_field password => (id => 'password') %>
+ <%= csrf_field %> diff --git a/templates/moderator/mod_reset.html.ep b/templates/moderator/mod_reset.html.ep index d4a3eb6..4ea08a6 100644 --- a/templates/moderator/mod_reset.html.ep +++ b/templates/moderator/mod_reset.html.ep @@ -10,6 +10,7 @@ <%= label_for password => 'Password' %> <%= password_field password => (id => 'password', autofocus => undef) %> + <%= csrf_field %> diff --git a/templates/moderator/promote.html.ep b/templates/moderator/promote.html.ep index 6c4b0e7..56f1f19 100644 --- a/templates/moderator/promote.html.ep +++ b/templates/moderator/promote.html.ep @@ -10,5 +10,6 @@ <%= label_for email => 'Email' %> <%= email_field email => (id => 'email', autofocus => undef) %> + <%= csrf_field %> diff --git a/templates/moderator/unlock_acct.html.ep b/templates/moderator/unlock_acct.html.ep index 4398034..ef7393b 100644 --- a/templates/moderator/unlock_acct.html.ep +++ b/templates/moderator/unlock_acct.html.ep @@ -10,5 +10,6 @@ <%= label_for email => 'Email' %> <%= email_field email => (id => 'email', autofocus => undef) %> + <%= csrf_field %>