interactive add-cloud does not validate endpoint urls

Bug #1641970 reported by Aaron Bentley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Unassigned

Bug Description

Interactive add-cloud does not ensure that the supplied endpoints are valid urls.

I tried with unicode ∃ and ≄, which are not even ASCII, much less valid URLs, and both were accepted:

$ juju add-cloud
Cloud Types
  maas
  manual
  openstack
  vsphere

Select cloud type: ∃
Invalid cloud type: "∃"

Select cloud type: maas

Enter a name for the cloud:

Enter a name for the cloud: ∃

Enter the API endpoint url: ∃

Cloud "∃" successfully added
You may bootstrap with 'juju bootstrap ∃'
$ juju add-cloud
Cloud Types
  maas
  manual
  openstack
  vsphere

Select cloud type: openstack

Enter a name for the cloud: ≄

Enter the API endpoint url for the cloud: ≄

Auth Types
  oauth1
  oauth2
  access-key
  userpass

Select one or more auth types separated by commas: oauth2

Enter region name: ∃

Enter the API endpoint url for the region: ∃

Enter another region? (Y/n): n

Cloud "≄" successfully added
You may bootstrap with 'juju bootstrap ≄'

Aaron Bentley (abentley)
Changed in juju:
milestone: none → 2.1.0
Revision history for this message
Aaron Bentley (abentley) wrote :

Upgraded to srs because it says juju must "error if a cloud endpoint is not reachable from the client", and an invalid URL is never reachable by the client. It could still be addressed by causing juju to error on unreachable URLs instead of invalid URLs in particular.

tags: added: srs
Changed in juju:
assignee: nobody → Nate Finch (natefinch)
status: Triaged → In Progress
Changed in juju:
status: In Progress → Triaged
assignee: Nate Finch (natefinch) → nobody
milestone: 2.1.0 → 2.2.0
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.2-beta1 → 2.2-beta2
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.2-beta2 → 2.2-beta3
Changed in juju:
milestone: 2.2-beta3 → 2.2-beta4
Changed in juju:
milestone: 2.2-beta4 → 2.2-rc1
Tim Penhey (thumper)
Changed in juju:
milestone: 2.2-rc1 → none
importance: High → Medium
Revision history for this message
Nam Nguyen (nammn) wrote :

This should be already merged some releases ago https://github.com/juju/juju/blob/develop/cmd/juju/cloud/add.go#L488

Changed in juju:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.