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

USB port_id schema wrong port path parsing #394

Closed
huettern opened this issue Jan 10, 2025 · 0 comments · Fixed by #395
Closed

USB port_id schema wrong port path parsing #394

huettern opened this issue Jan 10, 2025 · 0 comments · Fixed by #395

Comments

@huettern
Copy link
Contributor

The validator

if _, err := strconv.Atoi(idArray[1]); err != nil {
return errors.New(UsbPortID_Error_Invalid)
}

Expects a USB port of the form x-y, where x and y are integers. But according to the Proxmox Doc, y is the port path and is of the form a[.b[.c]...] where a, b, c are integers.

So the validator should be changed to check that y is a .-delimited list of integers.

Valid port paths are

  • 3-1
  • 3-1.1
  • 3-1.2.3
  • etc..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant