Custom Fields of type URL do not accept arbitrary schemes #11637

Closed
opened 2025-12-29 21:47:54 +01:00 by adam · 1 comment
Owner

Originally created by @githb-doc on GitHub (Sep 19, 2025).

NetBox Edition

NetBox Community

NetBox Version

v4.4.1

Python Version

3.10

Steps to Reproduce

  1. Create a custom field of type URL for object class DCIM->Device
  2. Edit a device and enter an URL with a custom scheme like cdb://byname/classname/...

Expected Behavior

The edit gets saved and I have a clickable URL.
All properly formatted URL schemes should be accepted, not only HTTP, HTTPS etc.

Observed Behavior

An error message is displayed:

Image

If I replace cdb:// with http:// the edit gets saved, so the error message is only triggered by the scheme part and not the rest of the URL.

Originally created by @githb-doc on GitHub (Sep 19, 2025). ### NetBox Edition NetBox Community ### NetBox Version v4.4.1 ### Python Version 3.10 ### Steps to Reproduce 1. Create a custom field of type URL for object class DCIM->Device 2. Edit a device and enter an URL with a custom scheme like _cdb://byname/classname/..._ ### Expected Behavior The edit gets saved and I have a clickable URL. All properly formatted URL schemes should be accepted, not only HTTP, HTTPS etc. ### Observed Behavior An error message is displayed: <img width="285" height="99" alt="Image" src="https://github.com/user-attachments/assets/fcf67f14-4488-4dc8-9df2-3e887d15b971" /> If I replace _cdb://_ with _http://_ the edit gets saved, so the error message is only triggered by the scheme part and not the rest of the URL.
adam added the netbox label 2025-12-29 21:47:54 +01:00
adam closed this issue 2025-12-29 21:47:54 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 19, 2025):

cdb: is not a well-known URL scheme, hence the validation failure. You need to add it as an allowed URL scheme by setting ALLOWED_URL_SCHEMES.

@jeremystretch commented on GitHub (Sep 19, 2025): `cdb:` is not a well-known URL scheme, hence the validation failure. You need to add it as an allowed URL scheme by setting [`ALLOWED_URL_SCHEMES`](https://netboxlabs.com/docs/v4.4/netbox/configuration/security/#allowed_url_schemes).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11637