Closed
Description
Deployment Type
Self-hosted
Triage priority
N/A
NetBox Version
v4.1.6
Python Version
3.12
Steps to Reproduce
- Install NetBox v4.1.0 - 4.1.6 and ensure configuration variable LOGIN_REQUIRED = True.
- Add an image attachment to any object and get the URL to the image
(https://yournetbox.com/media/image-attachments/yourimage.png) - Attempt to access that URL while logged out of NetBox.
I've reproduced this in various NetBox versions (4.1.0, 4.1.1, 4.1.5, 4.1.6) both as standalone and in Docker.
It is reproducible using the Documents plugin as well as it also stores files in the media directory (https://yournetbox.com/media/netbox-documents/doc.pdf)
I've also reproduced it on https://netbox-demo.netboxlabs.com, though I can't confirm if that instance has LOGIN_REQUIRED = True.
Expected Behavior
It is my understanding that NetBox should not display the file and instead redirect to the login page if the variable LOGIN_REQUIRED = True. This was the behavior seen on NetBox v4.0.3.