diff --git a/changedetectionio/blueprint/backups/__init__.py b/changedetectionio/blueprint/backups/__init__.py index d3c97a61a..b6b4c751c 100644 --- a/changedetectionio/blueprint/backups/__init__.py +++ b/changedetectionio/blueprint/backups/__init__.py @@ -98,7 +98,7 @@ def construct_blueprint(datastore: ChangeDetectionStore): backups_blueprint.register_blueprint(construct_restore_blueprint(datastore)) backup_threads = [] - @backups_blueprint.route("/request-backup", methods=['GET']) + @backups_blueprint.route("/request-backup", methods=['POST']) @login_optionally_required def request_backup(): if any(thread.is_alive() for thread in backup_threads): diff --git a/changedetectionio/blueprint/backups/templates/backup_create.html b/changedetectionio/blueprint/backups/templates/backup_create.html index 8bbd6f644..0718c5b73 100644 --- a/changedetectionio/blueprint/backups/templates/backup_create.html +++ b/changedetectionio/blueprint/backups/templates/backup_create.html @@ -35,8 +35,10 @@
{% endif %} - {{ _('Create backup') }} + {% if available_backups %} {# POST + CSRF token: this permanently deletes every backup archive, so it must not be reachable from a bare GET (an