From f810c0227b5c771241d0176780dab011ce533608 Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Thu, 2 Nov 2023 21:17:46 -0500 Subject: [PATCH] Add UPDATE to list of restricted keywords in read-only mode (#697) --- pkg/client/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/client/util.go b/pkg/client/util.go index 50d83d5..c665d10 100644 --- a/pkg/client/util.go +++ b/pkg/client/util.go @@ -8,7 +8,7 @@ import ( var ( // List of keywords that are not allowed in read-only mode - reRestrictedKeywords = regexp.MustCompile(`(?mi)\s?(CREATE|INSERT|DROP|DELETE|TRUNCATE|GRANT|OPEN|IMPORT|COPY)\s`) + reRestrictedKeywords = regexp.MustCompile(`(?mi)\s?(CREATE|INSERT|UPDATE|DROP|DELETE|TRUNCATE|GRANT|OPEN|IMPORT|COPY)\s`) // Comment regular expressions reSlashComment = regexp.MustCompile(`(?m)/\*.+\*/`)