dns_name is enforcing lower case #7376

Closed
opened 2025-12-29 20:22:36 +01:00 by adam · 2 comments
Owner

Originally created by @olafhering on GitHub (Dec 17, 2022).

NetBox version

v3.3.7

Python version

3.8

Steps to Reproduce

open https://host/ipam/ip-addresses/1/edit/
type a FQDN with an upper case letter in the hostname part.
click on Save
The IP Address overview part shows the DNS Name in all lower case.

Expected Behavior

The entered data should arrive "as is" in the database.

Observed Behavior

The data are somewhat corrupted, the upper/lower-case info is lost.

Originally created by @olafhering on GitHub (Dec 17, 2022). ### NetBox version v3.3.7 ### Python version 3.8 ### Steps to Reproduce open `https://host/ipam/ip-addresses/1/edit/` type a FQDN with an upper case letter in the hostname part. click on `Save` The `IP Address` overview part shows the `DNS Name` in all lower case. ### Expected Behavior The entered data should arrive "as is" in the database. ### Observed Behavior The data are somewhat corrupted, the upper/lower-case info is lost.
adam closed this issue 2025-12-29 20:22:36 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (Dec 18, 2022):

I'm gonna close this as DNS names are intentionally lowercased in netbox:

3675ad2539/netbox/ipam/models/ip.py (L873-L874)

From a very short googling, it seems like DNS names are case insensitive. If we were to change this behavior your would need to create a feature request instead, but you would have to provide a very good reason for why it should be changed, as it seems to be a very niche case to want case sensitive DNS names.

My best advice is to create a custom field on the IPAddress model for your case sensitive DNS records.

@kkthxbye-code commented on GitHub (Dec 18, 2022): I'm gonna close this as DNS names are intentionally lowercased in netbox: https://github.com/netbox-community/netbox/blob/3675ad2539400038af6797140ddca3679b8bca30/netbox/ipam/models/ip.py#L873-L874 From a very short googling, it seems like DNS names are case insensitive. If we were to change this behavior your would need to create a feature request instead, but you would have to provide a very good reason for why it should be changed, as it seems to be a very niche case to want case sensitive DNS names. My best advice is to create a custom field on the IPAddress model for your case sensitive DNS records.
Author
Owner

@olafhering commented on GitHub (Dec 20, 2022):

There is now a feature for this bug.

@olafhering commented on GitHub (Dec 20, 2022): There is now a feature for this bug.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7376