Server Error 502, when importing malformed vlans or adding ip-addresses without netmask #463

Closed
opened 2025-12-29 16:22:25 +01:00 by adam · 1 comment
Owner

Originally created by @christianpinger on GitHub (Oct 4, 2016).

If a user imports vlans and the data is malformed (in my case the site was written in upper case, but it's defined in lower case), the user get's only an error 502 instead of a error message.

The same thing happens, if an IP-address is created without specifying a subnet-mask.

If I remove the admins from netbox/netbox/configuration.py, the user will get an server error, but with an error message, eg.:

malformed vlan import (site name in wrong case):

<class 'django.db.models.fields.related_descriptors.RelatedObjectDoesNotExist'>

VLAN has no site.

adding ip address without subnetmask:

<type 'exceptions.AttributeError'>

'unicode' object has no attribute 'ip'

I think the user should always get an error message, if data was entered in incorrect syntax

Originally created by @christianpinger on GitHub (Oct 4, 2016). If a user imports vlans and the data is malformed (in my case the site was written in upper case, but it's defined in lower case), the user get's only an error 502 instead of a error message. The same thing happens, if an IP-address is created without specifying a subnet-mask. If I remove the admins from netbox/netbox/configuration.py, the user will get an server error, but with an error message, eg.: malformed vlan import (site name in wrong case): ``` <class 'django.db.models.fields.related_descriptors.RelatedObjectDoesNotExist'> VLAN has no site. ``` adding ip address without subnetmask: ``` <type 'exceptions.AttributeError'> 'unicode' object has no attribute 'ip' ``` I think the user should always get an error message, if data was entered in incorrect syntax
adam closed this issue 2025-12-29 16:22:25 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 1, 2016):

I'm not able to reproduce a server error from either of these actions. Please make sure you've upgraded to the latest code and try again. Closing this out for now.

@jeremystretch commented on GitHub (Nov 1, 2016): I'm not able to reproduce a server error from either of these actions. Please make sure you've upgraded to [the latest code](https://github.com/digitalocean/netbox/releases) and try again. Closing this out for now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#463