Updating an image by adding or replacing 'id' returns a 200 response

Bug #1439808 reported by Luke Wollney
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Niall Bunting

Bug Description

Overview:
When a user attempts to update an image by adding 'id' as an image property, a 200 response is returned.

Steps to reproduce:
1) Create an image
2) Update the image via PATCH /images/<id> passing '[{"path": "/id", "value": "00000000-0000-0000-0000-000000000000", "op": "add"}]'
3) Notice that a 200 accepted response is returned even though the image does not appear to be updated

Expected:
A 403 response should be returned

Actual:
A 200 response is returned and the image does not appear to be updated

Feilong Wang (flwang)
Changed in glance:
assignee: nobody → Fei Long Wang (flwang)
Revision history for this message
Luke Wollney (luke-wollney) wrote :

I have updated the title of this bug as updating an image by adding or replacing 'id' returns a 200. I would think that both requests should return a 403.

summary: - Updating an image by adding 'id' returns a 200 response
+ Updating/Deleting an image by adding 'id' returns a 200 response
summary: - Updating/Deleting an image by adding 'id' returns a 200 response
+ Updating an image by adding or replacing 'id' returns a 200 response
description: updated
Revision history for this message
Nikhil Komawar (nikhil-komawar) wrote :

Any update on this?

Revision history for this message
Stuart McLaren (stuart-mclaren) wrote :

@flwang

Is it ok if I re-assign this bug?

Revision history for this message
Stuart McLaren (stuart-mclaren) wrote :
Revision history for this message
Feilong Wang (flwang) wrote :

@stuart-mclaren, no problem :)

Changed in glance:
assignee: Fei Long Wang (flwang) → Niall Bunting (niall-bunting)
Changed in glance:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/199104
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=e21a1d659fcb94d8f42a022dff5c3ed1e50c1923
Submitter: Jenkins
Branch: master

commit e21a1d659fcb94d8f42a022dff5c3ed1e50c1923
Author: Niall Bunting <email address hidden>
Date: Tue Jul 7 13:46:45 2015 +0000

    Make 'id' a read only property for v2

    Currently updating 'id' via v2 api returns 200 and inserts a new id
    property in the user defined properties. This change makes the 'id'
    behaviour consistent with other read only properties ie. size and owner.

    Change-Id: Id728be86bc5a8f768a5687cb5c52054c8ed232ac
    Closes-bug: 1439808

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → liberty-3
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: liberty-3 → 11.0.0
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.