From 0e743fcee32745fa1b5290d377615e46c5da8550 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Sat, 16 Dec 2023 11:59:19 -0500 Subject: [PATCH] Check at HTTP layer for DELETE mode --- http/service.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/http/service.go b/http/service.go index f760857f..bb441e77 100644 --- a/http/service.go +++ b/http/service.go @@ -764,6 +764,11 @@ func (s *Service) handleBoot(w http.ResponseWriter, r *http.Request, qp QueryPar http.Error(w, "invalid SQLite data", http.StatusBadRequest) return } + if !db.IsDELETEModeEnabled(peek) { + http.Error(w, "SQLite database file is in WAL mode - convert it to DELETE mode via 'PRAGMA journal_mode=DELETE'", + http.StatusBadRequest) + return + } s.logger.Printf("starting boot process") _, err = s.store.ReadFrom(bufReader)