docker_container: fail if there are too many parts in a parsed port (#367)

* Fail if there are too many parts in a parsed port.

* Add tests.

* Prevent bad parsing.
This commit is contained in:
Felix Fontein
2022-05-22 17:20:05 +02:00
committed by GitHub
parent ab2d33aa99
commit 401a76ff00
3 changed files with 51 additions and 0 deletions
@@ -0,0 +1,2 @@
bugfixes:
- "docker_container - fail with a meaningful message instead of crashing if a port is specified with more than three colon-separated parts (https://github.com/ansible-collections/community.docker/pull/367, https://github.com/ansible-collections/community.docker/issues/365)."