swaschkut / pan-os-php

Framework and utilities to easily manage and edit Palo Alto Network PANOS devices
ISC License
15 stars 1 forks source link

Bug-08072024-1 Clone action adds "0" at the end of user defined string #22

Closed nexusops closed 2 months ago

nexusops commented 2 months ago

Describe the bug

Clone action from type=rule adds "0" at the end of user defined suffix

Expected behavior

The suffix added to the cloned rules should match the string defined by the user

Current behavior

"0" is added by PAN-OS-PHP at the end of the defined string

Possible solution

Prevent PAN-OS-PHP from adding "0" at the end of the suffix

Steps to reproduce

  1. Run any of these commands pan-os-php type=rule in=config.xml location=any 'actions=clone:yes,-This-is-a-suffix' out=config-suffix-test-1.xml pan-os-php type=rule in=config.xml location=any 'actions=clone:yes,"-This-is-a-suffix"' out=config-suffix-test-2.xml pan-os-php type=rule in=config.xml location=any 'actions=clone:yes,'-This-is-a-suffix'' out=config-suffix-test-3.xml

image

swaschkut commented 2 months ago

thanks for sharing this information.

please validate the develop repository: https://github.com/swaschkut/pan-os-php/tree/develop_2-1-X

or the develop Docker container: docker pull swaschkut/pan-os-php:develop

There is a new version available which should cover this

nexusops commented 2 months ago

Hi Sven, confirmed as fixed in 2.1.26 version. Thanks for fixing this so quickly :)

image