Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2013-02-12 15:18:36 +0400
committerLukas Reschke <lukas@statuscode.ch>2013-02-12 15:18:36 +0400
commit28dc89e94956f96e4346d9b4f6d33aed673a0a83 (patch)
tree6c325c3b6af7a3480e29eb3288984a70c7ec11d4
parent97d0cee75c56e6e907a15590bc910dd092647716 (diff)
[admin_migrate] Add requesttoken
-rw-r--r--apps/admin_migrate/settings.php3
-rw-r--r--apps/admin_migrate/templates/settings.php1
2 files changed, 4 insertions, 0 deletions
diff --git a/apps/admin_migrate/settings.php b/apps/admin_migrate/settings.php
index daa56390aff..c25327a9b7c 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 f81c9199ece..0b02d1babe9 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 />