id can be set in the post body in v1

Bug #1291595 reported by Vinod Mangalpally
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
Medium
Slawek Kaplonski
Icehouse
Fix Committed
Medium
Graham Hayes

Bug Description

I opened a new bug for v1 since the fixes might be different for v1 and v2.
I used MySQL with BIND for these tests. For a POST at /v1/domains with a body as below
{
    "id" : "2d1d1d1d-1324-4a80-aa32-1f69a91bf2c8",
    "ttl" : 12,
    "serial" : 100,
    "created_at" : "2014-02-24T16:16:42.000000",
    "updated_at" : "2014-02-24T16:16:42.000000",
    "name" : "example1.com.",
    "email" : "<email address hidden>"
}

I see a response of
{
  "created_at":"2014-02-24T16:16:42.000000",
  "description":null,
  "email":"<email address hidden>",
  "id":"2d1d1d1d-1324-4a80-aa32-1f69a91bf2c8",
  "name":"example1.com.",
  "serial":1394645589,
  "ttl":12,
  "updated_at":"2014-02-24T16:16:42.000000"
}
I can specify the serial, created_at, updated_at, id fields in the body. The id, created_at, updated_at fields are updated. The serial is silently ignored

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

Should such values like created_at, updated_at or id silently ignored like serial or maybe it should return some kind of warning (maybe in logs only) or error?

Changed in designate:
assignee: nobody → Slawek Kaplonski (slawek-t)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

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

Changed in designate:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.openstack.org/101779
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=e98e769c6958a370da93a9409229943c88484374
Submitter: Jenkins
Branch: master

commit e98e769c6958a370da93a9409229943c88484374
Author: Slawomir Kaplonski <email address hidden>
Date: Sun Jun 22 21:18:02 2014 +0000

    API v1 for creating domains ignore some attributes now

    Now API v1 for creating domain returns status 400 when in request POST
    body are send attributes like 'created_at', 'updated_at', 'id', or 'serial'

    Change-Id: I0b4deda212d3e5137d1224f3fd738e2bc68539bd
    Closes-Bug: 1291595

Changed in designate:
status: In Progress → Fix Committed
Changed in designate:
milestone: none → juno-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/113593

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on designate (master)

Change abandoned by Graham Hayes (<email address hidden>) on branch: master
Review: https://review.openstack.org/102650
Reason: Change merged in I0b4deda212d3e5137d1224f3fd738e2bc68539bd

Kiall Mac Innes (kiall)
Changed in designate:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (stable/icehouse)

Reviewed: https://review.openstack.org/113593
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=fca665396f952b2b288dd01095399102a8af001c
Submitter: Jenkins
Branch: stable/icehouse

commit fca665396f952b2b288dd01095399102a8af001c
Author: Slawomir Kaplonski <email address hidden>
Date: Sun Jun 22 21:18:02 2014 +0000

    API v1 for creating domains ignore some attributes now

    Now API v1 for creating domain returns status 400 when in request POST
    body are send attributes like 'created_at', 'updated_at', 'id', or 'serial'

    Change-Id: I0b4deda212d3e5137d1224f3fd738e2bc68539bd
    Closes-Bug: 1291595

Thierry Carrez (ttx)
Changed in designate:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in designate:
milestone: juno-3 → 2014.2
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.