[Pkg-owncloud-commits] [owncloud] 05/11: [admin_migrate] Add requesttoken
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:09:30 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v4.0.12
in repository owncloud.
commit 28dc89e94956f96e4346d9b4f6d33aed673a0a83
Author: Lukas Reschke <lukas at statuscode.ch>
Date: Tue Feb 12 12:18:36 2013 +0100
[admin_migrate] Add requesttoken
---
apps/admin_migrate/settings.php | 3 +++
apps/admin_migrate/templates/settings.php | 1 +
2 files changed, 4 insertions(+)
diff --git a/apps/admin_migrate/settings.php b/apps/admin_migrate/settings.php
index daa5639..c25327a 100644
--- a/apps/admin_migrate/settings.php
+++ b/apps/admin_migrate/settings.php
@@ -27,6 +27,8 @@ OCP\App::checkAppEnabled('admin_migrate');
// Export?
if (isset($_POST['admin_export'])) {
+ OCP\JSON::callCheck();
+
// Create the export zip
$response = json_decode( OC_Migrate::export( null, $_POST['export_type'] ) );
if( !$response->success ){
@@ -44,6 +46,7 @@ if (isset($_POST['admin_export'])) {
}
// Import?
} else if( isset($_POST['admin_import']) ){
+ OCP\JSON::callCheck();
$from = $_FILES['owncloud_import']['tmp_name'];
if( !OC_Migrate::import( $from, 'instance' ) ){
diff --git a/apps/admin_migrate/templates/settings.php b/apps/admin_migrate/templates/settings.php
index f81c919..0b02d1b 100644
--- a/apps/admin_migrate/templates/settings.php
+++ b/apps/admin_migrate/templates/settings.php
@@ -6,6 +6,7 @@
</p>
<h3>What would you like to export?</h3>
<p>
+ <input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>" id="requesttoken">
<input type="radio" name="export_type" value="instance" style="width:20px;" /> ownCloud instance (suitable for import )<br />
<input type="radio" name="export_type" value="system" style="width:20px;" /> ownCloud system files<br />
<input type="radio" name="export_type" value="userfiles" style="width:20px;" /> Just user files<br />
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list