mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Apply host check to Appwrite-to-CSV/JSON exports too
This commit is contained in:
@@ -203,7 +203,8 @@ class Migrations extends Action
|
||||
}
|
||||
|
||||
if (! empty($credentials['projectId'])) {
|
||||
$isAppwriteToAppwrite = $source === SourceAppwrite::getName()
|
||||
$isAppwriteSource = $source === SourceAppwrite::getName();
|
||||
$isAppwriteToAppwrite = $isAppwriteSource
|
||||
&& $destination === DestinationAppwrite::getName();
|
||||
|
||||
$this->sourceProject = $this->dbForPlatform->getDocument('projects', $credentials['projectId']);
|
||||
@@ -240,7 +241,7 @@ class Migrations extends Action
|
||||
|| (empty($credentials['endpoint']) && $migrationHost !== '');
|
||||
|
||||
$isLocalSource = !$this->sourceProject->isEmpty()
|
||||
&& (!$isAppwriteToAppwrite || $isLocalEndpoint);
|
||||
&& (!$isAppwriteSource || $isLocalEndpoint);
|
||||
|
||||
if ($isLocalSource) {
|
||||
$projectDB = call_user_func($this->getProjectDB, $this->sourceProject);
|
||||
|
||||
Reference in New Issue
Block a user