From 2783c4c653682c5be5e28408f8b146bc5813e116 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Mon, 21 Nov 2016 18:52:51 +0000 Subject: [PATCH] Add authentication level checks to SQL INFO query --- sql/info.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/info.go b/sql/info.go index b6a3f5b0..e1c39865 100644 --- a/sql/info.go +++ b/sql/info.go @@ -18,9 +18,9 @@ func (p *parser) parseInfoStatement() (stmt *InfoStatement, err error) { stmt = &InfoStatement{} - stmt.KV = p.c.Get("KV").(string) - stmt.NS = p.c.Get("NS").(string) - stmt.DB = p.c.Get("DB").(string) + if stmt.KV, stmt.NS, stmt.DB, err = p.o.get(AuthDB); err != nil { + return nil, err + } if _, _, exi := p.mightBe(FOR); exi { if stmt.What, err = p.parseName(); err != nil {