Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large integers in interface names produce "out of range for type integer" error #2019

Closed
frankfarmer opened this issue Apr 10, 2018 · 0 comments · Fixed by #2020
Closed

Large integers in interface names produce "out of range for type integer" error #2019

frankfarmer opened this issue Apr 10, 2018 · 0 comments · Fixed by #2020
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@frankfarmer
Copy link
Contributor

Issue type

[ ] Feature request
[x] Bug report
[ ] Documentation

Environment

  • Python version: 3.4.0
  • NetBox version: 2.3.2

Description

We've been programmatically populating our netbox instance via the API, and accidentally discovered that creating an interface with a name like cali12345678901 results in a postgres error: value "12345678901" is out of range for type integer

To reproduce:

  1. Add a new interface named cali12345678901 through the API, or via the web GUI
  2. Attempt to enumerate interfaces for the same device via the API, e.g.: http://my-netbox-host/api/dcim/interfaces/?device_id=1234

A very similar issue was already addressed in e5e32d8 / #747. Simply applying the same patch to the relevant regexes seems to suffice in this context as well.

@jeremystretch jeremystretch added the type: bug A confirmed report of unexpected behavior in the application label Apr 12, 2018
jeremystretch added a commit that referenced this issue Apr 12, 2018
#2019 : avoid illegal casts on large integers
@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants