Allow whitespace prefix for sql queries
This commit is contained in:
parent
23265861c9
commit
34ead0aec2
1 changed files with 1 additions and 1 deletions
|
@ -437,7 +437,7 @@ class UiWebsocket(object):
|
|||
def actionDbQuery(self, to, query, params=None, wait_for=None):
|
||||
rows = []
|
||||
try:
|
||||
assert query.upper().startswith("SELECT"), "Only SELECT query supported"
|
||||
assert query.strip().upper().startswith("SELECT"), "Only SELECT query supported"
|
||||
res = self.site.storage.query(query, params)
|
||||
except Exception, err: # Response the error to client
|
||||
return self.response(to, {"error": str(err)})
|
||||
|
|
Loading…
Reference in a new issue