mirror of
https://github.com/friendica/friendica
synced 2025-04-20 19:10:11 +00:00
Normalize use of form security tokens in Admin modules
# Conflicts: # src/Module/Admin/Logs/Settings.php
This commit is contained in:
parent
2ce15cae1a
commit
9bc2c5a52e
12 changed files with 43 additions and 39 deletions
|
@ -31,12 +31,12 @@ class Tos extends BaseAdmin
|
|||
{
|
||||
parent::post($parameters);
|
||||
|
||||
parent::checkFormSecurityTokenRedirectOnError('/admin/tos', 'admin_tos');
|
||||
|
||||
if (empty($_POST['page_tos'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
self::checkFormSecurityTokenRedirectOnError('/admin/tos', 'admin_tos');
|
||||
|
||||
$displaytos = !empty($_POST['displaytos']);
|
||||
$displayprivstatement = !empty($_POST['displayprivstatement']);
|
||||
$tostext = (!empty($_POST['tostext']) ? strip_tags(trim($_POST['tostext'])) : '');
|
||||
|
@ -64,7 +64,7 @@ class Tos extends BaseAdmin
|
|||
'$preview' => DI::l10n()->t('Privacy Statement Preview'),
|
||||
'$privtext' => $tos->privacy_complete,
|
||||
'$tostext' => ['tostext', DI::l10n()->t('The Terms of Service'), DI::config()->get('system', 'tostext'), DI::l10n()->t('Enter the Terms of Service for your node here. You can use BBCode. Headers of sections should be [h2] and below.')],
|
||||
'$form_security_token' => parent::getFormSecurityToken('admin_tos'),
|
||||
'$form_security_token' => self::getFormSecurityToken('admin_tos'),
|
||||
'$submit' => DI::l10n()->t('Save Settings'),
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue