PaloAltoNetworks / PaloAltoNetworks/pan-os-python
Block adding an object to itself (by using .add) as it causes infinite recursive loop on PanObject.vsys()
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 400
- Forks
- 199
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
It is actually possible to add an object to itself (using the PanObject.add() method), which can causes infinite depth recursivity issue when using delete() or delete_similar() on it.
Possible solution
Avoid the possibility of adding an object to itself through the PanObject.add() method.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating PanObject.add() and tracing how a self-added object reaches vsys(), delete(), and delete_similar(). Done means PanObject.add() prevents an object from being added to itself and those operations no longer enter infinite recursion; run the existing test suite to verify the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100