[PR #19347] [MERGED] Fixes #19346: Ensure all redirect URLs are validated #15625

Closed
opened 2025-12-30 00:23:04 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19347
Author: @jeremystretch
Created: 4/28/2025
Status: Merged
Merged: 4/30/2025
Merged by: @bctiemann

Base: mainHead: 19346-redirect-checks


📝 Commits (1)

📊 Changes

6 files changed (+28 additions, -9 deletions)

View changed files

📝 netbox/account/views.py (+3 -2)
📝 netbox/dcim/views.py (+2 -1)
📝 netbox/netbox/views/generic/bulk_views.py (+6 -2)
📝 netbox/netbox/views/generic/object_views.py (+4 -1)
📝 netbox/utilities/request.py (+11 -1)
📝 netbox/utilities/views.py (+2 -2)

📄 Description

Fixes: #19346

  • Introduce the safe_for_redirect() utility function
  • Ensure it's used to wrap all redirect URLs that could potentially contain user-originated data

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/19347 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 4/28/2025 **Status:** ✅ Merged **Merged:** 4/30/2025 **Merged by:** [@bctiemann](https://github.com/bctiemann) **Base:** `main` ← **Head:** `19346-redirect-checks` --- ### 📝 Commits (1) - [`e44ad8a`](https://github.com/netbox-community/netbox/commit/e44ad8af4512400c244589bbc34c1dc294792fc5) Fixes #19346: Ensure all redirect URLs are validated ### 📊 Changes **6 files changed** (+28 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `netbox/account/views.py` (+3 -2) 📝 `netbox/dcim/views.py` (+2 -1) 📝 `netbox/netbox/views/generic/bulk_views.py` (+6 -2) 📝 `netbox/netbox/views/generic/object_views.py` (+4 -1) 📝 `netbox/utilities/request.py` (+11 -1) 📝 `netbox/utilities/views.py` (+2 -2) </details> ### 📄 Description ### Fixes: #19346 - Introduce the `safe_for_redirect()` utility function - Ensure it's used to wrap all redirect URLs that could potentially contain user-originated data --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:23:04 +01:00
adam closed this issue 2025-12-30 00:23:04 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15625