-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
postgres.db_create: fix handling of empty string (#33261)
* modules.postgres: fix handling of empty string in db_create The code responsible for collecting the parameters used in the CREATE DATABASE query works unexpectedly in case for values which are evaluated to False as bool, but are not None. This caused queries with missing rvalues like this one (lc_collate=""): 2016-05-13 16:04:05,243 [salt.loaded.int.module.cmdmod][ERROR ][2990] stderr: ERROR: syntax error at or near "OWNER" LINE 1: ..._production" WITH ENCODING = 'utf8' LC_COLLATE = OWNER = "g... Please note that proper escaping or a different approach would be needed here. * modules.postgres: handle trivial sqli in db_create * modules.postgres: fix OrderedDict usage * modules.postgres: quote TABLESPACE too in db_create
- Loading branch information
Showing
2 changed files
with
43 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters