-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't use partial XPath when sending "set" config operations
Support for partial XPaths have been removed in PAN-OS 11.0.3-h3, and full XPaths are supported across all PAN-OS versions we're targetting.
- Loading branch information
1 parent
11eb059
commit 12be24f
Showing
3 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package xml | ||
|
||
import "bytes" | ||
|
||
func StripEntryElement(data []byte) []byte { | ||
if !bytes.HasPrefix(data, []byte("<entry")) || !bytes.HasSuffix(data, []byte("</entry>")) { | ||
return data | ||
} | ||
|
||
var startIdx, endIdx int | ||
startIdx = bytes.Index(data, []byte(">")) | ||
endIdx = len(data) - len("</entry>") | ||
|
||
return data[startIdx+1 : endIdx] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters