Quick Add for MAC address doesn't work in my browsers #11287

Closed
opened 2025-12-29 21:42:59 +01:00 by adam · 5 comments
Owner

Originally created by @postilion on GitHub (Jun 16, 2025).

Deployment Type

Self-hosted

NetBox Version

v4.3.1

Python Version

3.12

Steps to Reproduce

  1. In Device, Click on Interface Edit
  2. In interface click plus sign (+) next to "Primary MAC address"

Expected Behavior

A widget should appear allowing input of a MAC address.

Note: The similar process for adding Device Role, within a Device Edit window, does work as expected.

Observed Behavior

A grey mask appears across the window, but no entry widget appears. Here's a screen capture from Firefox 139.0.4:

Image

Same thing happens in Brave 1.79.123.

Without this quick add, I see no other way to manage MAC addresses.
-nic

Originally created by @postilion on GitHub (Jun 16, 2025). ### Deployment Type Self-hosted ### NetBox Version v4.3.1 ### Python Version 3.12 ### Steps to Reproduce 1. In Device, Click on Interface Edit 2. In interface click plus sign (+) next to "Primary MAC address" ### Expected Behavior A widget should appear allowing input of a MAC address. Note: The similar process for adding Device Role, within a Device Edit window, does work as expected. ### Observed Behavior A grey mask appears across the window, but no entry widget appears. Here's a screen capture from Firefox 139.0.4: ![Image](https://github.com/user-attachments/assets/b1924b35-3e45-47e3-a0de-91c1a8d65249) Same thing happens in Brave 1.79.123. Without this quick add, I see no other way to manage MAC addresses. -nic
adam added the type: bugstatus: revisions needed labels 2025-12-29 21:42:59 +01:00
adam closed this issue 2025-12-29 21:42:59 +01:00
Author
Owner

@DanSheps commented on GitHub (Jun 16, 2025):

I am unable to reproduce this on v4.3.2 using either Chrome or Brave or FireFox. This is likely an issue with your installation, please ensure you run the collectstatic command line for NetBox when installing and ensure your web server points to the static folder appropriately.

@DanSheps commented on GitHub (Jun 16, 2025): I am unable to reproduce this on v4.3.2 using either Chrome or Brave or FireFox. This is likely an issue with your installation, please ensure you run the `collectstatic` command line for NetBox when installing and ensure your web server points to the static folder appropriately.
Author
Owner

@postilion commented on GitHub (Jun 17, 2025):

Netbox has been installed for years now, and updated with new releases on a regular basis, using the update.sh script.

Just now I've manually run this sequence:

root@monitor:/opt/netbox# source /opt/netbox/venv/bin/activate
root@monitor:/opt/netbox# netbox/manage.py collectstatic

You have requested to collect static files at the destination
location as specified in your settings:

    /opt/netbox/netbox/static

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes

0 static files copied to '/opt/netbox/netbox/static', 502 unmodified.

root@monitor:/opt/netbox# systemctl restart netbox netbox-rq

and the problem persists.

As stated in my original post, the Quick Add for Device Role works properly. It's only the MAC Address Quick Add which exhibits this problem.

If there's some other step I should be taking, or further debugging information I can provide, please advise.
-nic

@postilion commented on GitHub (Jun 17, 2025): Netbox has been installed for years now, and updated with new releases on a regular basis, using the update.sh script. Just now I've manually run this sequence: ```bash root@monitor:/opt/netbox# source /opt/netbox/venv/bin/activate root@monitor:/opt/netbox# netbox/manage.py collectstatic You have requested to collect static files at the destination location as specified in your settings: /opt/netbox/netbox/static This will overwrite existing files! Are you sure you want to do this? Type 'yes' to continue, or 'no' to cancel: yes 0 static files copied to '/opt/netbox/netbox/static', 502 unmodified. root@monitor:/opt/netbox# systemctl restart netbox netbox-rq ``` and the problem persists. As stated in my original post, the Quick Add for Device Role works properly. It's only the MAC Address Quick Add which exhibits this problem. If there's some other step I should be taking, or further debugging information I can provide, please advise. -nic
Author
Owner

@SA0TAY commented on GitHub (Jun 19, 2025):

This happens to us as well. When clicking the plus sign, the browser's error console shows a Response Status Error Code 403 from /dcim/mac-addresses/add/?_quickadd=True&target=id_primary_mac_address&interface=1.

@SA0TAY commented on GitHub (Jun 19, 2025): This happens to us as well. When clicking the plus sign, the browser's error console shows a `Response Status Error Code 403 from /dcim/mac-addresses/add/?_quickadd=True&target=id_primary_mac_address&interface=1`.
Author
Owner

@postilion commented on GitHub (Jun 20, 2025):

@SA0TAY
Thank you for that pointer! I've got the same error:
htmx.esm.js:3013 Response Status Error Code 403 from /dcim/mac-addresses/add/?_quickadd=True&target=id_primary_mac_address&interface=7348
-nic

@postilion commented on GitHub (Jun 20, 2025): @SA0TAY Thank you for that pointer! I've got the same error: `htmx.esm.js:3013 Response Status Error Code 403 from /dcim/mac-addresses/add/?_quickadd=True&target=id_primary_mac_address&interface=7348 ` -nic
Author
Owner

@jnovinger commented on GitHub (Jun 23, 2025):

@postilion , I can also not reproduce this on v4.3.2 (or v4.3.1).

Image

Image

Given that you're getting a 403 (Forbidden), this feels like it might be CSRF or authentication/authorization related. I'm inclined to not believe this is CSRF, since this appears to be happening (form your explanation) on the initial GET operation, which should be exempt from CSRF.

Since neither Dan nor I can reproduce, I'm going to convert this to a discussion and see if anyone else has any input.

@jnovinger commented on GitHub (Jun 23, 2025): @postilion , I can also not reproduce this on v4.3.2 (or v4.3.1). <img width="1480" alt="Image" src="https://github.com/user-attachments/assets/00de04f3-a3ce-43e9-8a2c-963f9edf062a" /> ![Image](https://github.com/user-attachments/assets/c41d4e45-2963-4455-a813-ee411159dc50) Given that you're getting a 403 (Forbidden), this feels like it might be CSRF or authentication/authorization related. I'm inclined to not believe this is CSRF, since this appears to be happening (form your explanation) on the initial GET operation, which should be exempt from CSRF. Since neither Dan nor I can reproduce, I'm going to convert this to a discussion and see if anyone else has any input.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11287