← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1593418] [NEW] Segmennt create operation doesn't validate network_type

 

Public bug reported:

POST /segments operations don't validate the network_type attribute in
the request. As a consequence, user can specify any arbitrary value in
this attribute as long as maximum length (64) is not exceeded.

To reproduce send a POST /segments request with a body similar to this:

{
    "segment": {
        "network_id": "e396da0c-1f1a-42a7-a999-9e74dc624f47",
        "physical_network": "physnet2",
        "network_type": "hola",
        "segmentation_id": 2016
    }
}

Neutron server will merrily create the segment:

Status Code: 201 Created

{
  "segment": {
    "network_id": "e396da0c-1f1a-42a7-a999-9e74dc624f47",
    "segmentation_id": 2016,
    "physical_network": "physnet2",
    "id": "9c8c49c9-0a99-4f59-abe2-a45c5bb0d7d5",
    "network_type": "hola"
  }
}

Showing up in the network: http://paste.openstack.org/show/516726/

** Affects: neutron
     Importance: Medium
     Assignee: Miguel Lavalle (minsel)
         Status: New

** Changed in: neutron
   Importance: Undecided => Medium

** Changed in: neutron
     Assignee: (unassigned) => Miguel Lavalle (minsel)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1593418

Title:
  Segmennt create operation doesn't validate network_type

Status in neutron:
  New

Bug description:
  POST /segments operations don't validate the network_type attribute in
  the request. As a consequence, user can specify any arbitrary value in
  this attribute as long as maximum length (64) is not exceeded.

  To reproduce send a POST /segments request with a body similar to
  this:

  {
      "segment": {
          "network_id": "e396da0c-1f1a-42a7-a999-9e74dc624f47",
          "physical_network": "physnet2",
          "network_type": "hola",
          "segmentation_id": 2016
      }
  }

  Neutron server will merrily create the segment:

  Status Code: 201 Created

  {
    "segment": {
      "network_id": "e396da0c-1f1a-42a7-a999-9e74dc624f47",
      "segmentation_id": 2016,
      "physical_network": "physnet2",
      "id": "9c8c49c9-0a99-4f59-abe2-a45c5bb0d7d5",
      "network_type": "hola"
    }
  }

  Showing up in the network: http://paste.openstack.org/show/516726/

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1593418/+subscriptions


Follow ups