mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 10:40:22 -07:00
postgresql_info: add the trust_input parameter (#308)
* postgresql_info: add the trust_input parameter * add changelog fragment
This commit is contained in:
parent
156d90ce90
commit
acc7bc1ea6
3 changed files with 34 additions and 1 deletions
|
@ -139,6 +139,7 @@
|
|||
<<: *pg_parameters
|
||||
login_db: '{{ test_db }}'
|
||||
login_port: '{{ master_port }}'
|
||||
trust_input: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
|
@ -152,3 +153,19 @@
|
|||
- result.settings
|
||||
- result.tablespaces
|
||||
- result.roles
|
||||
|
||||
- name: postgresql_info - test trust_input parameter
|
||||
<<: *task_parameters
|
||||
postgresql_info:
|
||||
<<: *pg_parameters
|
||||
login_db: '{{ test_db }}'
|
||||
login_port: '{{ master_port }}'
|
||||
trust_input: no
|
||||
session_role: 'curious.anonymous"; SELECT * FROM information_schema.tables; --'
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is failed
|
||||
- result.msg is search('is potentially dangerous')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue