create an image leaks tmp file if name not specified

Bug #1253791 reported by David Lapsley
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
New
Low
Unassigned

Bug Description

Creating an image via project/images_and_snapshots/ "create an image" modal will upload the file to the django temporary files directory even if the image name field is left blank. In this case, when the "create image" button is clicked, the image is uploaded to the temporary directory, and then a new form is shown indicating the validation error (name field is required). However, at this point, the image has already been leaked and will never be removed from the temporary directory.

The fix proposed to #1125232 by casanch1 could also be extended to fix this bug on the client side (server side checks should also be added in any case).

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

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

Changed in horizon:
assignee: nobody → xiaohanyu (xiaohanyu1988)
status: New → In Progress
Revision history for this message
Cristian A Sanchez (cristian-a-sanchez) wrote :

Hi xiaohanyu,
I was woking with the submitter of this bug to fix this, and I forgot to assign the bug to me. Could you please confirm if you'll be working on this? I have also done a fix on a similar bug in another page and was planning to apply the same solution.
Thanks,

Revision history for this message
Cristian A Sanchez (cristian-a-sanchez) wrote :

Hi xiaohanyu,
Angular is already in. Please let me know if you will work on this. If not, I can re-implement the bug using angular.
Thanks

Changed in horizon:
assignee: xiaohanyu (xiaohanyu1988) → Cristian A Sanchez (cristian-a-sanchez)
Changed in horizon:
status: In Progress → New
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in horizon:
status: New → In Progress
Revision history for this message
gounini (gounini) wrote :

There is a similar issue if you don't specify "Format" and validate the form. It uploads the image and give you "This field is required" after uploading.

Tested on IceHouse on Ubuntu 14.04

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

Change abandoned by David Lyle (<email address hidden>) on branch: master
Review: https://review.openstack.org/62075
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

David Lyle (david-lyle)
Changed in horizon:
importance: Undecided → Low
assignee: Cristian A Sanchez (cristian-a-sanchez) → nobody
Adriano (dritec)
Changed in horizon:
assignee: nobody → Adriano (dritec)
Revision history for this message
Adriano (dritec) wrote :

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

Adriano (dritec)
Changed in horizon:
assignee: Adriano (dritec) → nobody
Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

We have to check if it's still actual.

Changed in horizon:
status: In Progress → New
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.