Skip to content

Commit e9a5e39

Browse files
Fixing adding special characters in audit comments of security policies (#39608) (#39662)
* Fixing adding special characters in audit comments of security policies & <> + chars are breaking the command See slack: https://panw-global.slack.com/archives/C011E5T5K17/p1744962593038919 * Update CONTRIBUTORS.json * Update pack_metadata.json Bumping up the pack version * Create 2_3_10.md adding release notes * Update 2_3_10.md fixing md * Create 2_3_11.md bumping up version again * Update pack_metadata.json * Delete Packs/PAN-OS/ReleaseNotes/2_3_10.md Co-authored-by: Maciej Drobniuch <mdrobniuch@paloaltonetworks.com>
1 parent 2350c4a commit e9a5e39

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

Packs/PAN-OS/CONTRIBUTORS.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
["Adam Baumeister", "Adam Burt", "Johnathan Wilkes"]
1+
["Adam Baumeister", "Adam Burt", "Johnathan Wilkes", "Maciej Drobniuch"]

Packs/PAN-OS/Integrations/Panorama/Panorama.py

+1
Original file line numberDiff line numberDiff line change
@@ -4045,6 +4045,7 @@ def build_audit_comment_cmd(xpath, audit_comment, xml_type="set") -> str:
40454045
"""
40464046
Builds up the needed `cmd` param to get or update the audit comment of a policy rule.
40474047
"""
4048+
audit_comment = html.escape(html.escape(audit_comment)) # special characters need to be escaped twice to be properly stored on PANOS side.
40484049
if xml_type == "set":
40494050
return f"<set><audit-comment><xpath>{xpath}</xpath><comment>{audit_comment}</comment></audit-comment></set>"
40504051
elif xml_type == "show":

Packs/PAN-OS/ReleaseNotes/2_3_11.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#### Integrations
2+
3+
##### Palo Alto Networks PAN-OS
4+
5+
Fixed handling special characters in additional commends of security rules.

Packs/PAN-OS/pack_metadata.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "PAN-OS by Palo Alto Networks",
33
"description": "Manage Palo Alto Networks Firewall and Panorama. Use this pack to manage Prisma Access through Panorama. For more information see Panorama documentation.",
44
"support": "xsoar",
5-
"currentVersion": "2.3.10",
5+
"currentVersion": "2.3.11",
66
"author": "Cortex XSOAR",
77
"url": "https://www.paloaltonetworks.com/cortex",
88
"email": "",
@@ -49,4 +49,4 @@
4949
"X5",
5050
"ENT_PLUS"
5151
]
52-
}
52+
}

0 commit comments

Comments
 (0)