Quantumv2 api didn't check string parameter length

Bug #1044129 reported by Nachi Ueno
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Won't Fix
Low
Jiajun Liu

Bug Description

Quantumv2 api didn't check string parameter length

1. create network name which has 255 0's and some 1.
It looks created.

'_': quantum net-create 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111
Created a new network:
+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up | True |
| id | 38ee91a2-b199-45de-be62-9c440c957668 |
| name | 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111 |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 44d16a5d952a42b7a8932a5c002a1095 |
+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

2. However only 255 chars registered.

'_': quantum net-list [~/devstack]
+----------------+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+--------+--------------------------------------+----------------------------------+
| admin_state_up | id | name | shared | status | subnets | tenant_id |
+----------------+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+--------+--------------------------------------+----------------------------------+
| True | 38ee91a2-b199-45de-be62-9c440c957668 | 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 | False | ACTIVE | | 44d16a5d952a42b7a8932a5c002a1095 |
| True | b437938e-051b-437f-971d-b67640fcf2a1 | net1 | False | ACTIVE | 66c1bd0a-417f-48e6-8f0b-40aca2a4c3f3 | 44d16a5d952a42b7a8932a5c002a1095 |
+----------------+--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+--------+--------------------------------------+----------------------------------+
'

Jiajun Liu (ljjjustin)
Changed in quantum:
assignee: nobody → ljjjustin (ljjjustin)
Revision history for this message
dan wendlandt (danwent) wrote :

depending on how simple and low risk the fix is, we can consider this for folsom.

Changed in quantum:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/12245

Changed in quantum:
status: Confirmed → In Progress
dan wendlandt (danwent)
tags: added: low-hanging-fruit
Revision history for this message
Mark McClain (markmcclain) wrote :

Changing back to confirmed since the proposed code review has expired.

tags: added: api
Changed in quantum:
status: In Progress → Confirmed
Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

This has already been fixed by:

commit 5dbb4046637462bdcb04acc8f4cbebf8db480f35
Author: Gary Kotton <email address hidden>
Date: Mon Oct 8 05:58:00 2012 +0000

    Ensure that HTTP 400 codes are returned for invalid input

    Fixes bug 1062046

    A number of additional validation functions were added. They
    do basic validations.

    Change-Id: I0fc207e996f11b50fdaa4d80075ae5704cba7003

Changed in quantum:
status: Confirmed → Won't Fix
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.