Skip to content

Commit

Permalink
Raise exceptions securely
Browse files Browse the repository at this point in the history
  • Loading branch information
peteeckel committed Dec 12, 2023
1 parent 67390a7 commit 65d9cd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions netbox_dns/signals/ipam_coupling.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ def ip_address_delete_address_record(instance, **kwargs):

except DNSPermissionDenied as exc:
if request.path_info.startswith("/api/"):
raise APIPermissionDenied(exc)
raise APIPermissionDenied(exc) from None

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.

raise PermissionDenied(exc)
raise PermissionDenied(exc) from None

for record in instance.netbox_dns_records.all():
record.delete()
Expand Down

0 comments on commit 65d9cd5

Please sign in to comment.