fortinet-ansible-dev / ansible-galaxy-fortios-collection

GNU General Public License v3.0
84 stars 48 forks source link

fortios_configuration_fact: urlencode filters #208

Closed jplitza closed 1 year ago

jplitza commented 1 year ago

The following task invocation:

- fortinet.fortios.fortios_configuration_fact:
    selector: firewall_policy
    vdom: root
    filters:
      - 'dstintf==VLAN 10'

yields this error (boiled down):

ansible.module_utils.connection.ConnectionError: URL can't contain control characters. '/api/v2/cmdb/firewall/policy?vdom=root&filter=dstintf==VLAN 10' (found at least ' ')

Manually putting in %20 instead of the space works, but that should probably be handled by the module (not least due to security concerns).

MaxxLiu22 commented 1 year ago

Hi @jplitza ,

Thank you for raising this issue and sorry for any inconvenience. I can reproduce this issue on my side and have reported it to the development team. I will let you know if there are any updates

Thanks, Maxx

lix-fortinet commented 1 year ago

Hi @jplitza,

This issue is fixed on the latest release of FortiOS Ansible collection v2.2.0. Please switch to v2.2.0 and try it again.

Please let me know if you have any questions.

Thanks, Xing