Skip to content

ALLOWED_URL_SCHEMES not honoured for custom fields of type 'URL' #8319

@candlerb

Description

@candlerb

NetBox version

v3.1.5

Python version

3.8

Steps to Reproduce

  1. Ensure ALLOWED_URL_SCHEMES is not set in configuration.py
  2. Create a custom field
    • name 'blah'
    • type 'URL'
    • content types 'DCIM > Device'
  3. Browse to a device
  4. Enter URL ssh://foo into the blah custom field (also try ssh://foo/, ssh://foo/bar)

Expected Behavior

URL to be accepted, since the default is:

        default=(
            'file', 'ftp', 'ftps', 'http', 'https', 'irc', 'mailto', 'sftp', 'ssh', 'tel', 'telnet', 'tftp', 'vnc',
            'xmpp',
        ),

Observed Behavior

Errors

Blah

  • Enter a valid URL.

Note also that http://foo is accepted but file://foo is not

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions