Add input validation related to reserved/forbidden characters #4895

Closed
opened 2025-12-29 19:21:45 +01:00 by adam · 2 comments
Owner

Originally created by @yarnocobussen on GitHub (May 11, 2021).

NetBox version

v2.11.3

Feature type

Change to existing functionality

Proposed functionality

It's currently possible to input reserved/forbidden characters into some fields, which breaks functionality. For example: it's possible to use a double underscore in the name field of a custom field, which has a special meaning in Django. This results in broken queries related to these fields. (See #6375 )

The proposed functionality is to add input validation which prevents the use of these character combinations.

Use case

The data in Netbox will be protected from altered behavior caused by unwanted inputs. Users will experience more consistency when interacting with data stored within Netbox.

Database changes

None that I am aware of

External dependencies

None

Originally created by @yarnocobussen on GitHub (May 11, 2021). ### NetBox version v2.11.3 ### Feature type Change to existing functionality ### Proposed functionality It's currently possible to input reserved/forbidden characters into some fields, which breaks functionality. For example: it's possible to use a double underscore in the name field of a custom field, which has a special meaning in Django. This results in broken queries related to these fields. (See #6375 ) The proposed functionality is to add input validation which prevents the use of these character combinations. ### Use case The data in Netbox will be protected from altered behavior caused by unwanted inputs. Users will experience more consistency when interacting with data stored within Netbox. ### Database changes None that I am aware of ### External dependencies None
adam added the type: featurestatus: revisions needed labels 2025-12-29 19:21:45 +01:00
adam closed this issue 2025-12-29 19:21:45 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 11, 2021):

The proposed functionality is to add input validation which prevents the use of these character combinations.

Please revise your issue to indicate the specific changes you are proposing, including the model fields and proposed validation rules.

@jeremystretch commented on GitHub (May 11, 2021): > The proposed functionality is to add input validation which prevents the use of these character combinations. Please revise your issue to indicate the *specific* changes you are proposing, including the model fields and proposed validation rules.
Author
Owner

@jeremystretch commented on GitHub (May 25, 2021):

Closing due to inactivity.

@jeremystretch commented on GitHub (May 25, 2021): Closing due to inactivity.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4895