fix: security + data-integrity fixes (P0/P1) #211
Reference in New Issue
Block a user
Delete Branch "fix/security-integrity-p0p1"
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?
Batches the P0 (security) and P1 (data-integrity) fixes from the triage.
php -lclean, XML well-formed.Security (P0)
'ftp' => ['password']to both$secretsmaps inAjaxController::maskSecrets()/mergeExistingSecrets()(stored FTP remotes no longer leak their password vialistRemotes).'absolute_path'from$fieldsToRenderIteminapi/.../Backups/JsonapiView.php(single-item API view no longer exposes the server filesystem path).SftpUploaderscp/ssh builders:StrictHostKeyChecking=no→accept-new(TOFU instead of blind-accept; closes the trivial MITM).Data integrity / correctness (P1)
DatabaseDumper.php:329: emit a real newline afterDROP TABLE(was a literal\nin a double-quoted string, corrupting the streamed dump).ORDER BY idinstead of theorderingcolumn, which migration01.43.33drops on upgraded sites (the query errored there). Fixed inplg_task .../run_profile.xmlandplg_content .../mokosuitebackup.xml. (Fresh installs still create the now-unused column viainstall.mysql.sql— harmless; removing it is a minor follow-up.)uninstall.mysql.sql: add the missingDROP TABLE … _snapshots(was orphaning the table).data_file(the real column);file_pathdoesn't exist, so snapshot files were never unlinked.onExtensionBeforeUpdate(that's owned by the system plugin); it keepsonExtensionBeforeInstall. One update → one backup.DatabaseImporternow collects non-fatal statement errors (getErrors()/hasErrors()) instead of onlyerror_log-and-continue. Backward compatible (still returns the count, still continues); this makes restores no longer silent so the caller can surface a warning status. (Wiring the restore-status tohasErrors()is the remaining half of #188 — left for a focused follow-up since it touches the restore flow.)Also
Folds in the
.mokogitea/CLAUDE.mdmokoplatform→mokoclistale-name fix (loose end).Closes #169, #179, #180, #181, #182, #184, #186, #187. Partially addresses #188.
https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
ad182f163cto99b844e04aWiki reminder: docs are wiki-first -- if this PR changes behavior, usage, config, or standards, please update the repo wiki before/after merge. (non-blocking)