From 19e4f3c2f082278e524c463cce7ce0858a2258f8 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 27 Nov 2018 11:53:02 -0800 Subject: prevent incompatible export files (osada/zap) from being imported. This is to keep your DB from getting trashed. We probably need a similar thing for item import since the object formats aren't compatible --- Zotlabs/Module/Import.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Zotlabs/Module/Import.php') diff --git a/Zotlabs/Module/Import.php b/Zotlabs/Module/Import.php index 6016328a5..0daf28aa9 100644 --- a/Zotlabs/Module/Import.php +++ b/Zotlabs/Module/Import.php @@ -127,6 +127,15 @@ class Import extends \Zotlabs\Web\Controller { // // } + + // prevent incompatible osada or zap data from horking your database + + if(array_path_exists('compatibility/codebase',$data)) { + notice('Data export format is not compatible with this software'); + return; + } + + if($moving) $seize = 1; -- cgit v1.2.3