[fix] Fixed admin subnet export multitenancy security issue#220
Conversation
Before this patch, if a specific subnet ID was known, any staff user with permissions to operate on subnet objects was allowed to export the subnet contents, regardless of whether they managed the organization of the subnet or not. This patch fixes it.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
🧰 Additional context used📓 Path-based instructions (1)**/*.{py,html}📄 CodeRabbit inference engine (Custom checks)
Files:
🪛 ast-grep (0.43.0)openwisp_ipam/admin.py[error] 149-149: Lack of sanitization of user data (http-response-from-request) 🔇 Additional comments (2)
📝 WalkthroughWalkthroughThe subnet CSV export admin view in Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/backport 1.2 |
Checklist
Reference to Existing Issue
Addresses GHSA-x287-5c68-36wp.
Description of Changes
Before this patch, if a specific subnet ID was known, any staff user with permissions to operate on subnet objects was allowed to export the subnet contents, regardless of whether they managed the organization of the subnet or not. This patch fixes it.