fix: remote upload prefix mismatch and restore security file #193
Reference in New Issue
Block a user
Delete Branch "fix/sftp-upload-and-restore-security"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary\n\n- SFTP/FTP/S3/GDrive upload fix:
createUploaderFromParams()now adds the type-specific prefix (sftp_,ftp_,s3_,gdrive_) to param keys before passing to uploader constructors. The remotes table stores unprefixed keys (host,port) but all uploaders expect prefixed names (sftp_host,sftp_port). This caused "SFTP host is not configured" errors on every multi-remote upload.\n- Restore security file fix: Renamed.mokorestore-security.phptomokorestore-security.php(no leading dot). Dotfiles are hidden by default in file managers and blocked by most web server configs, making the security verification step impossible to complete. Also added cleanup of the security file inactionCleanup().\n\nCloses #13\n\n## Test plan\n\n- [ ] Create an SFTP remote destination on a profile, run a backup, verify upload succeeds\n- [ ] Test with FTP, S3, and Google Drive remote types if available\n- [ ] Generate a standalone restore.php, deploy to a test server, verifymokorestore-security.phpis created and visible\n- [ ] Complete the security verification flow and confirm the file is deleted after verification\n- [ ] Run cleanup step and verifymokorestore-security.phpis removed\n\nhttps://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG