Merge branch 'importcsrf' of https://github.com/dawnbreak/hubzilla into csrf

This commit is contained in:
zotlabs
2017-03-30 21:05:31 -07:00
4 changed files with 8 additions and 7 deletions

View File

@@ -478,6 +478,8 @@ class Import extends \Zotlabs\Web\Controller {
if(! $account_id)
return;
check_form_security_token_redirectOnErr('/import', 'channel_import');
$this->import_account($account_id);
}
@@ -508,6 +510,7 @@ class Import extends \Zotlabs\Web\Controller {
'$pleasewait' => t('This process may take several minutes to complete. Please submit the form only once and leave this page open until finished.'),
'$email' => '',
'$pass' => '',
'$form_security_token' => get_form_security_token('channel_import'),
'$submit' => t('Submit')
));

View File

@@ -15,6 +15,8 @@ class Import_items extends \Zotlabs\Web\Controller {
if(! local_channel())
return;
check_form_security_token_redirectOnErr('/import_items', 'import_items');
$data = null;
$src = $_FILES['filename']['tmp_name'];
@@ -123,6 +125,7 @@ class Import_items extends \Zotlabs\Web\Controller {
'$title' => t('Import Items'),
'$desc' => t('Use this form to import existing posts and content from an export file.'),
'$label_filename' => t('File to Upload'),
'$form_security_token' => get_form_security_token('import_items'),
'$submit' => t('Submit')
));