summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework/session_instance.js
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2015-11-23 14:17:21 +0100
committerXavier Morel <xmo@odoo.com>2016-02-17 12:12:14 +0100
commit26a8b438b6cc94241354af9fe218d8c592e17cfa (patch)
tree88c35b5a38a6d6dd3a3f5b73b3f52d4af742e614 /addons/web/static/src/js/framework/session_instance.js
parent1e729c7c5af67cfea38f0135a252a6f08786177c (diff)
[IMP] provide pg connection information as keywords
When the database_or_uri is not a URI, rather than generate a dsn string just collect the various psycopg2.connect keyword arguments in a dictionary, and return that. This way psycopg2/libpq is the one doing any necessary processing on the various parameters. Fixes #3865 and fixes #6958 in a more resilient manner than manually escaping dsn-injected values so database names or passwords containing spaces or non-ascii characters work correctly. In case a URI is provided to the dsn() function, return it as the `dsn` keyword to get the same behaviour as previously. Since we're checking dsns by equality, a dict should work just as well as a string.
Diffstat (limited to 'addons/web/static/src/js/framework/session_instance.js')
0 files changed, 0 insertions, 0 deletions