fix: harden backend synchronization
This commit is contained in:
@@ -14,6 +14,7 @@ return static function (AppContext $ctx): void {
|
||||
$ctx->requireCsrf('update:' . $id);
|
||||
$input = normalize_rule_post($_POST);
|
||||
$patch = attach_rule_scope($ctx, RuleValidator::validate($input, $ctx->settings));
|
||||
enforce_rule_backend_constraints($ctx, $id, $patch);
|
||||
$ctx->rules->update($ctx->daUser->username(), $id, $patch);
|
||||
$ctx->syncActiveBackend();
|
||||
Http::redirect($ctx->url('index.html', ['status' => 'updated']));
|
||||
|
||||
Reference in New Issue
Block a user