requests.Session.send() defaults allow_redirects=True, and send_webhook()'s call
never overrode it. A webhook destination's response therefore controlled where
the request actually went: a destination that is legitimate at configuration
time but is later compromised (or is malicious from the outset while appearing
legitimate) could respond with a redirect to an arbitrary address -- including
an internal one -- bypassing whatever destination was actually configured.
This is distinct from the documented threat model's carve-out for webhook
authors deliberately targeting arbitrary endpoints (THREAT_MODEL.md): that
carve-out covers the operator's own configured payload_url, not a third
party's response silently redirecting the request elsewhere.
Passes allow_redirects=False to session.send(); a 3xx response now surfaces as
a failed webhook via the existing status-code check, same as any other
non-2xx response.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Clear cable_connector and cable_positions when deleting profiled cables.
Adds data migration to clean up stale values from earlier versions that
failed to clear these fields, preventing validation errors on affected
endpoints.
Fixes#22737
The ScriptModule add view now falls back to the Scripts list when no
explicit return URL is provided. Adds regression test to verify the
default return URL behavior.
Fixes#22697
Changes 'site' to 'location' in the error message format string to match
the actual parameter name being passed. Adds regression test coverage to
verify the error message displays the correct location name.
Fixes#22717
Add missing keyword argument to format() calls in validation error
messages. This ensures the invalid data value is properly included in
the error message returned to the user.
Fixes#22719
Pass the device context to resolve_name() when creating port mappings
and assigning interface bridges. This ensures that component template
names containing {vc_position} resolve consistently with the names of
the instantiated device components.
Fixes#22707
Replicate Bootstrap's invalid styling for Tom Select widgets with
explicit .is-invalid class, and apply NetBox's server-side error border
to widgets with aria-invalid='true'. This ensures consistent validation
feedback across both client and server-side validation states.
Fixes#22712
CachedScopeMixin._region and ._site_group may cache ancestors of a
Site or Location scope. Change these relationships to SET_NULL so
deleting a Region or SiteGroup clears the cached value instead of
deleting the scoped Prefix, Cluster, or WirelessLAN.
Add reverse GenericRelation fields for Cluster and WirelessLAN on
Region and SiteGroup. This preserves the expected cascade when a
Region or SiteGroup is itself the direct scope, matching the existing
Prefix behavior.
Add migrations recording the ORM-level on_delete changes and regression
coverage for Site, Location, and direct Region/SiteGroup scopes.
Add initial Python package support for NetBox, including wheel and sdist
builds, generated package metadata, and Test PyPI publishing for maintainer
validation.
Add package-aware CLI support, `netbox setup` scaffolding for instance-local
files, and centralized wheel-vs-checkout path handling while preserving the
existing source/archive install layout.
Bundle pre-rendered embedded documentation in the wheel, and extend CI to
verify dependency pins, wheel metadata, artifact contents, CLI behavior, sdist
rebuilds, and smoke-test upgrades.
Force autoescape=False in ConfigTemplate.get_environment_params() after
merging user-supplied environment parameters. Config templates produce
plain-text network configurations and scripts, so HTML autoescaping is
not applicable.
Keep the override out of the shared render_jinja2() helper so export
templates can continue to use autoescape=True for HTML output. Add
regression coverage for both behaviors.
Add PUT/PATCH support to ScriptModuleViewSet for replacing Script Module
content in place. Modules can be addressed by numeric ID or file name,
and the uploaded file name must match the existing file path.
The module's scripts are re-synchronized from the new content after
successful update.
Fixes#22544