Move include/security tp /src/Core/Authentication and /src/Util/Security
This commit is contained in:
parent
93c6dddc0d
commit
05be2db725
30 changed files with 613 additions and 572 deletions
|
@ -13,6 +13,7 @@ use Friendica\Model\Contact;
|
|||
use Friendica\Model\Photo;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Object\Image;
|
||||
use Friendica\Util\Security;
|
||||
|
||||
function profile_photo_init(App $a)
|
||||
{
|
||||
|
@ -30,7 +31,7 @@ function profile_photo_post(App $a)
|
|||
return;
|
||||
}
|
||||
|
||||
check_form_security_token_redirectOnErr('/profile_photo', 'profile_photo');
|
||||
Security::check_form_security_token_redirectOnErr('/profile_photo', 'profile_photo');
|
||||
|
||||
if (!empty($_POST['cropfinal']) && $_POST['cropfinal'] == 1) {
|
||||
|
||||
|
@ -246,7 +247,7 @@ function profile_photo_content(App $a)
|
|||
'$title' => L10n::t('Upload Profile Photo'),
|
||||
'$submit' => L10n::t('Upload'),
|
||||
'$profiles' => $profiles,
|
||||
'$form_security_token' => get_form_security_token("profile_photo"),
|
||||
'$form_security_token' => Security::get_form_security_token("profile_photo"),
|
||||
'$select' => sprintf('%s %s', L10n::t('or'),
|
||||
($newuser) ? '<a href="' . System::baseUrl() . '">' . L10n::t('skip this step') . '</a>' : '<a href="' . System::baseUrl() . '/photos/' . $a->user['nickname'] . '">' . L10n::t('select a photo from your photo albums') . '</a>')
|
||||
]);
|
||||
|
@ -263,7 +264,7 @@ function profile_photo_content(App $a)
|
|||
'$image_url' => System::baseUrl() . '/photo/' . $filename,
|
||||
'$title' => L10n::t('Crop Image'),
|
||||
'$desc' => L10n::t('Please adjust the image cropping for optimum viewing.'),
|
||||
'$form_security_token' => get_form_security_token("profile_photo"),
|
||||
'$form_security_token' => Security::get_form_security_token("profile_photo"),
|
||||
'$done' => L10n::t('Done Editing')
|
||||
]);
|
||||
return $o;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue