1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/tests/unit/plugins/modules
patchback[bot] 4255c0d2fc
nmcli: writing secrets to command line is a security hole (#3160) (#3180)
* nmcli: use `stdin` for setting private `wifi_sec` options

I.E.:
* `802-11-wireless-security.leap-password`
* `802-11-wireless-security.psk`
* `802-11-wireless-security.wep-key0`
* `802-11-wireless-security.wep-key1`
* `802-11-wireless-security.wep-key2`
* `802-11-wireless-security.wep-key3`

* Changelog fragement formatting.

* Update changelogs/fragments/3160-pass-wifi-secrets-via-stdin-to-nmcli-module.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Make `wifi_sec_secret_options()` into a constant

* Minor cleanup

`'set ' + key + ' ' + value`
=>
`'set %s %s' % (key, value)`

* Change `casing`

* Change `WIFI_SEC_SECRET_OPTIONS` from `list` to `tuple`

* Update `edit_connection()` to not reset `edit_commands`

It will just re`set` them if `edit_connection()` is called more than
once.

* Do not call `edit_connection()` if `connection_update(*)` fails

* Fixed `pep8` issue `E713` in tests

`test for membership should be 'not in'`

* Simplify `create_connection()`/`modify_connection()` logic

* `WIFI_SEC_SECRET_OPTIONS`=>`SECRET_OPTIONS`, options are prefixed

* Moved `if key in self.SECRET_OPTIONS` into `if value is not None` check

We don't need to do anything is the value is None

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 7f96b7df60)

Co-authored-by: David Hummel <6109326+hummeltech@users.noreply.github.com>
2021-08-08 19:27:11 +02:00
..
cloud proxmox_kvm: Fix ZFS device string parsing (#2841) (#2846) 2021-06-20 13:05:16 +02:00
database Hana query userstore (#3125) (#3152) 2021-08-05 23:03:05 +02:00
files archive - fixing determination of archive root when root is '/' (#3036) (#3062) 2021-07-24 22:23:20 +02:00
identity Keycloak: add client_rolemapping management (#2941) (#3117) 2021-07-30 18:29:20 +00:00
messaging Move modules and module_utils unit tests to correct place (#81) 2020-03-31 10:42:38 +02:00
monitoring Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) (#2882) 2021-06-27 09:39:18 +02:00
net_tools nmcli: writing secrets to command line is a security hole (#3160) (#3180) 2021-08-08 19:27:11 +02:00
notification discord.py: Add new module for discord notifications (#2398) (#2493) 2021-05-11 20:05:59 +02:00
packaging npm - fix installing from package.json (#2924) (#2929) 2021-07-02 21:59:41 +02:00
remote_management Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) (#2882) 2021-06-27 09:39:18 +02:00
source_control github_repo: support GitHub on premise installations (#3039) (#3046) 2021-07-22 17:11:22 +02:00
storage sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
system xfconf_info - new module (#3045) (#3063) 2021-07-24 22:40:48 +02:00
web_infrastructure Add fallback url for jenkins plugin (#1334) (#2903) 2021-06-29 09:02:35 +00:00
__init__.py Move modules and module_utils unit tests to correct place (#81) 2020-03-31 10:42:38 +02:00
conftest.py Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) (#2882) 2021-06-27 09:39:18 +02:00
utils.py Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) (#2882) 2021-06-27 09:39:18 +02:00