Skip to content

Commit 3942fd4

Browse files
authored
Fix false positive non-superuser errors
Regex matching solely against the word "insufficient" means that it's trivial to cause this to alert unnecessarily by merely including the string "insufficient" in one's real query. Instead verify that we don't actually have a real query and know for certain this is an error condition.
1 parent 9f536c7 commit 3942fd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

check_postgres.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8737,7 +8737,7 @@ sub check_txn_idle {
87378737
my $st = defined($r->{state}) ? $r->{state} : '';
87388738

87398739
## Return unknown if we cannot see because we are a non-superuser
8740-
if ($cq =~ /insufficient/) {
8740+
if ($cq eq '<insufficient privilege>') {
87418741
add_unknown msg('psa-nosuper');
87428742
return;
87438743
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy