diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_pgsql.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c index d56ce9b0..8cfc1ab5 100644 --- a/plugins/check_pgsql.c +++ b/plugins/check_pgsql.c @@ -329,9 +329,9 @@ is_pg_dbname (char *dbname) return (FALSE); strncpy (txt, dbname, NAMEDATALEN - 1); txt[NAMEDATALEN - 1] = 0; - if (sscanf (txt, "%[_a-zA-Z]%[^_a-zA-Z0-9]", tmp, tmp) == 1) + if (sscanf (txt, "%[_a-zA-Z]%[^_a-zA-Z0-9-]", tmp, tmp) == 1) return (TRUE); - if (sscanf (txt, "%[_a-zA-Z]%[_a-zA-Z0-9]%[^_a-zA-Z0-9]", tmp, tmp, tmp) == + if (sscanf (txt, "%[_a-zA-Z]%[_a-zA-Z0-9-]%[^_a-zA-Z0-9-]", tmp, tmp, tmp) == 2) return (TRUE); return (FALSE); } |