From ee629b229f7cda133ed1187d52a2709758c4b201 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 3 Oct 2013 12:37:17 +0200 Subject: [PATCH] CSRF protection for forms --- com.woltlab.wcf/templates/accountManagement.tpl | 6 ++---- com.woltlab.wcf/templates/disclaimer.tpl | 5 ++--- com.woltlab.wcf/templates/emailActivation.tpl | 5 ++--- com.woltlab.wcf/templates/emailNewActivationCode.tpl | 5 ++--- com.woltlab.wcf/templates/login.tpl | 5 ++--- com.woltlab.wcf/templates/lostPassword.tpl | 5 ++--- com.woltlab.wcf/templates/mail.tpl | 5 ++--- com.woltlab.wcf/templates/membersList.tpl | 1 + com.woltlab.wcf/templates/moderationActivation.tpl | 3 +++ com.woltlab.wcf/templates/moderationReport.tpl | 3 +++ com.woltlab.wcf/templates/newPassword.tpl | 5 ++--- com.woltlab.wcf/templates/notificationSettings.tpl | 5 ++--- com.woltlab.wcf/templates/register.tpl | 5 ++--- com.woltlab.wcf/templates/registerActivation.tpl | 5 ++--- com.woltlab.wcf/templates/registerNewActivationCode.tpl | 5 ++--- com.woltlab.wcf/templates/search.tpl | 5 ++--- com.woltlab.wcf/templates/searchArea.tpl | 1 + com.woltlab.wcf/templates/signatureEdit.tpl | 5 ++--- com.woltlab.wcf/templates/userPanel.tpl | 1 + com.woltlab.wcf/templates/userSearch.tpl | 3 +++ com.woltlab.wcf/templates/usersOnlineList.tpl | 1 + wcfsetup/install/files/acp/templates/applicationEdit.tpl | 5 ++--- wcfsetup/install/files/acp/templates/attachmentList.tpl | 3 +++ wcfsetup/install/files/acp/templates/bbcodeAdd.tpl | 6 +++--- .../files/acp/templates/bbcodeMediaProviderAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/categoryAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/cronjobAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/dataImport.tpl | 8 ++++---- wcfsetup/install/files/acp/templates/exceptionLogView.tpl | 3 +++ wcfsetup/install/files/acp/templates/labelAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/labelGroupAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/languageAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/languageExport.tpl | 5 ++--- wcfsetup/install/files/acp/templates/languageImport.tpl | 5 ++--- wcfsetup/install/files/acp/templates/languageItemList.tpl | 3 +++ .../files/acp/templates/languageMultilingualism.tpl | 5 ++--- .../install/files/acp/templates/languageServerAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/login.tpl | 5 ++--- wcfsetup/install/files/acp/templates/masterPassword.tpl | 5 ++--- wcfsetup/install/files/acp/templates/option.tpl | 5 ++--- wcfsetup/install/files/acp/templates/optionImport.tpl | 5 ++--- .../install/files/acp/templates/packageStartInstall.tpl | 5 ++--- .../files/acp/templates/packageUpdateServerAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/pageMenuItemAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/smileyAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/styleAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/styleExport.tpl | 3 +++ wcfsetup/install/files/acp/templates/styleImport.tpl | 3 +++ wcfsetup/install/files/acp/templates/tagAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/tagList.tpl | 3 +++ wcfsetup/install/files/acp/templates/templateAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/templateGroupAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/templateList.tpl | 3 +++ .../files/acp/templates/userActivityPointOption.tpl | 5 ++--- wcfsetup/install/files/acp/templates/userAdd.tpl | 5 ++--- .../install/files/acp/templates/userAssignToGroup.tpl | 5 ++--- .../install/files/acp/templates/userBulkProcessing.tpl | 5 ++--- .../files/acp/templates/userEmailAddressExport.tpl | 3 +++ wcfsetup/install/files/acp/templates/userGroupAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/userGroupOption.tpl | 3 +++ wcfsetup/install/files/acp/templates/userMail.tpl | 5 ++--- wcfsetup/install/files/acp/templates/userMerge.tpl | 5 ++--- wcfsetup/install/files/acp/templates/userOptionAdd.tpl | 5 ++--- .../install/files/acp/templates/userOptionCategoryAdd.tpl | 5 ++--- .../install/files/acp/templates/userOptionSetDefaults.tpl | 5 ++--- wcfsetup/install/files/acp/templates/userRankAdd.tpl | 5 ++--- wcfsetup/install/files/acp/templates/userSearch.tpl | 3 +++ 67 files changed, 146 insertions(+), 152 deletions(-) diff --git a/com.woltlab.wcf/templates/accountManagement.tpl b/com.woltlab.wcf/templates/accountManagement.tpl index 8056baf774..a090721e04 100644 --- a/com.woltlab.wcf/templates/accountManagement.tpl +++ b/com.woltlab.wcf/templates/accountManagement.tpl @@ -18,9 +18,7 @@ {include file='userNotice'} -{if $errorField} -

{lang}wcf.global.form.error{/lang}

-{/if} +{include file='formError'}

{lang}wcf.user.accountManagement.warning{/lang}

@@ -289,8 +287,8 @@
- {@SECURITY_TOKEN_INPUT_TAG} + {@SECURITY_TOKEN_INPUT_TAG}
diff --git a/com.woltlab.wcf/templates/disclaimer.tpl b/com.woltlab.wcf/templates/disclaimer.tpl index 5cdb0bc74e..22e25911ec 100644 --- a/com.woltlab.wcf/templates/disclaimer.tpl +++ b/com.woltlab.wcf/templates/disclaimer.tpl @@ -16,9 +16,7 @@ {include file='userNotice'} -{if $errorField} -

{lang}wcf.global.form.error{/lang}

-{/if} +{include file='formError'}
{hascontent} @@ -43,6 +41,7 @@ {/if} diff --git a/com.woltlab.wcf/templates/emailActivation.tpl b/com.woltlab.wcf/templates/emailActivation.tpl index e0383c1df8..da398c23c6 100644 --- a/com.woltlab.wcf/templates/emailActivation.tpl +++ b/com.woltlab.wcf/templates/emailActivation.tpl @@ -16,9 +16,7 @@ {include file='userNotice'} -{if $errorField} -

{lang}wcf.global.form.error{/lang}

-{/if} +{include file='formError'}
{hascontent} @@ -79,6 +77,7 @@
+ {@SECURITY_TOKEN_INPUT_TAG}
diff --git a/com.woltlab.wcf/templates/emailNewActivationCode.tpl b/com.woltlab.wcf/templates/emailNewActivationCode.tpl index 46546ead4d..2958ac6c85 100644 --- a/com.woltlab.wcf/templates/emailNewActivationCode.tpl +++ b/com.woltlab.wcf/templates/emailNewActivationCode.tpl @@ -15,9 +15,7 @@ {include file='userNotice'} -{if $errorField} -

{lang}wcf.global.form.error{/lang}

-{/if} +{include file='formError'}
{hascontent} @@ -78,6 +76,7 @@
+ {@SECURITY_TOKEN_INPUT_TAG}
diff --git a/com.woltlab.wcf/templates/login.tpl b/com.woltlab.wcf/templates/login.tpl index eb51d0154a..e91de28363 100644 --- a/com.woltlab.wcf/templates/login.tpl +++ b/com.woltlab.wcf/templates/login.tpl @@ -24,9 +24,7 @@ {include file='userNotice'} -{if $errorField} -

{lang}wcf.global.form.error{/lang}

-{/if} +{include file='formError'}
{hascontent} @@ -153,6 +151,7 @@
+ {@SECURITY_TOKEN_INPUT_TAG}
diff --git a/com.woltlab.wcf/templates/lostPassword.tpl b/com.woltlab.wcf/templates/lostPassword.tpl index fe8b3a341d..319a90b458 100644 --- a/com.woltlab.wcf/templates/lostPassword.tpl +++ b/com.woltlab.wcf/templates/lostPassword.tpl @@ -26,9 +26,7 @@

{lang}wcf.user.lostPassword.description{/lang}

-{if $errorField} -

{lang}wcf.global.form.error{/lang}

-{/if} +{include file='formError'}
{hascontent} @@ -88,6 +86,7 @@
+ {@SECURITY_TOKEN_INPUT_TAG}
diff --git a/com.woltlab.wcf/templates/mail.tpl b/com.woltlab.wcf/templates/mail.tpl index 65d218a17a..5b994a8210 100644 --- a/com.woltlab.wcf/templates/mail.tpl +++ b/com.woltlab.wcf/templates/mail.tpl @@ -15,9 +15,7 @@ {include file='userNotice'} -{if $errorField} -

{lang}wcf.global.form.error{/lang}

-{/if} +{include file='formError'}
{hascontent} @@ -110,6 +108,7 @@
+ {@SECURITY_TOKEN_INPUT_TAG}
diff --git a/com.woltlab.wcf/templates/membersList.tpl b/com.woltlab.wcf/templates/membersList.tpl index ceed61997d..f9ddba4d31 100644 --- a/com.woltlab.wcf/templates/membersList.tpl +++ b/com.woltlab.wcf/templates/membersList.tpl @@ -92,6 +92,7 @@
+ {@SECURITY_TOKEN_INPUT_TAG}
diff --git a/com.woltlab.wcf/templates/moderationActivation.tpl b/com.woltlab.wcf/templates/moderationActivation.tpl index 3c861e4fe1..95811ab723 100644 --- a/com.woltlab.wcf/templates/moderationActivation.tpl +++ b/com.woltlab.wcf/templates/moderationActivation.tpl @@ -30,6 +30,8 @@ {include file='userNotice'} +{include file='formError'} +