mirror of
https://github.com/itflow-org/itflow
synced 2026-08-04 22:57:14 +00:00
Backups are now AES-256 encrypted zips in three types (full, database only, master key), catalogued in a new backups table, built by cron rather than the web request, and kept under uploads/backups with retention in the nightly job. The encryption key is one value per install held in config.php, never in the database and never in the file name. Restore is shared by the setup wizard and the new scripts/restore_cli.php, which is the only path without an upload size limit. It verifies the key and unpacks the archive before dropping anything, and dumps the current database first so a failed import is rolled back. A backup dumps, zips and encrypts for minutes without issuing a query, so on a server with a short wait_timeout the connection is closed underneath it and the UPDATE marking the backup complete is what fails - long after the archive was written correctly. The connection is now held open for the job and re-established before any write that follows long file work, including the database phase of a restore. Retention recovers rows a dropped connection left behind: still Running after six hours becomes Complete if the archive is on disk, Failed if it is not. cron.php's own failure path is hardened to match. It recorded job failures through the same connection the failing job had just killed, so an uncaught exception ended the dispatch and no trace of the original error survived. Failures now also echo to stdout, so cron mails something useful when the database is unreachable. Security: the setup wizard's restore step is now closed on any install that has users, whatever config.php says. $config_enable_setup defaulted to enabled when the flag was absent, and the flag is only written at the end of a successful install, so an install abandoned partway left an unauthenticated endpoint that would drop every table, import an attacker-supplied archive, and overwrite uploads/ including the .htaccess that stops PHP running there. Affects 26.07 and earlier. Restoring over a live install is now CLI only.
57 lines
1.5 KiB
Plaintext
57 lines
1.5 KiB
Plaintext
node_modules
|
|
config.php
|
|
|
|
uploads/favicon.ico
|
|
uploads/clients/*
|
|
!uploads/clients/index.php
|
|
uploads/custom/*
|
|
!uploads/custom/index.php
|
|
uploads/documents/*
|
|
!uploads/documents/index.php
|
|
uploads/document_templates/*
|
|
!uploads/document_templates/index.php
|
|
uploads/expenses/*
|
|
!uploads/expenses/index.php
|
|
uploads/recurring_tickets/*
|
|
!uploads/recurring_tickets/index.php
|
|
uploads/settings/*
|
|
!uploads/settings/index.php
|
|
uploads/users/*
|
|
!uploads/users/index.php
|
|
uploads/tmp/*
|
|
!uploads/tmp/index.php
|
|
uploads/backups/*
|
|
!uploads/backups/index.php
|
|
!uploads/backups/.htaccess
|
|
uploads/tickets/*
|
|
!uploads/tickets/index.php
|
|
uploads/ticket_templates/*
|
|
!uploads/ticket_templates/index.php
|
|
.idea/*
|
|
plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/HTML/*
|
|
!plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/HTML/.gitkeep
|
|
plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/URI/*
|
|
!plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/URI/.gitkeep
|
|
plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/CSS/*
|
|
!plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/CSS/.gitkeep
|
|
.vscode/settings.json
|
|
admin/custom/*
|
|
!admin/custom/readme.php
|
|
agent/custom/*
|
|
!agent/custom/readme.php
|
|
client/custom/*
|
|
!client/custom/readme.php
|
|
guest/custom/*
|
|
!guest/custom/readme.php
|
|
cron/custom/*
|
|
!cron/custom/readme.php
|
|
scripts/custom/*
|
|
!scripts/custom/readme.php
|
|
setup/custom/*
|
|
!setup/custom/readme.php
|
|
api/v1/custom/*
|
|
!api/v1/custom/readme.php
|
|
.zed
|
|
|
|
*.patch
|