F diff --git a/php/move.php b/php/move.php
--- a/php/move.php
+++ b/php/move.php
$old_dir = get_directory($old_folder, $user);
$new_dir = get_directory($new_folder, $user);
- if (!$old_dir || !$new_dir) {
+ $trash_dir = get_directory("/trash",$user);
+ $share_dir = get_directory("/share",$user);
+ if (!$old_dir || !$new_dir || $old_dir==$user->home_directory || $old_dir==$trash_dir || $old_dir==$share_dir) {
error_log("invalid src/dst dir");
http_response_code(409);
exit(0);
F diff --git a/php/node.php b/php/node.php
--- a/php/node.php
+++ b/php/node.php
{
global $database;
$parent_dir_id=get_directory($abstract_path,$user);
+ if($parent_dir_id==$user->home_directory && ($filename=="share" || $filename=="trash"))
+ {
+ return ;
+ }
$database->unlink_nodes($parent_dir_id,$filename);
}
function create_share_link(string $abstract_path,string $filename,string $password,