← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1488174] Re: A tag with a long length will return a 500

 

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

commit 577ef1b70c1f319716c0f153cf0048d61de3f722
Author: NiallBunting <niall.bunting@xxxxxx>
Date:   Tue Aug 25 14:54:08 2015 +0000

    Test tag against schema to check length
    
    This bug checks the tag against the v2 schema so that if the tag is
    too long this is picked up and a 400 in returned along with the schema
    message. The schema was used so if it ever changes this will evolve
    with it.
    
    Closes-Bug: 1488174
    Change-Id: Ibb8250851b1b716d8198ad1a4ca04b7d6a4d40dc


** Changed in: glance
       Status: In Progress => Fix Released

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

Title:
  A tag with a long length will return a 500

Status in Glance:
  Fix Released

Bug description:
  Overview: 
  The tag length is not checked, it tries to insert the tag into the database and can't. This then causes a database exception.

  How to produce:
  curl -v -X PUT  http://10.0.0.8:9292/v2/images/4e1cd2f0-8704-4e19-953f-62ff14d1b22a/tags/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 -H "X-Auth-Token: eb51438851c64ffab72163092924e1cf"
  > PUT /v2/images/4e1cd2f0-8704-4e19-953f-62ff14d1b22a/tags/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 HTTP/1.1
  > User-Agent: curl/7.35.0
  > Host: 10.0.0.8:9292
  > Accept: */*
  > X-Auth-Token: eb51438851c64ffab72163092924e1cf
  > 

  Actual result:
  < HTTP/1.1 500 Internal Server Error
  < Content-Length: 228
  < Content-Type: text/html; charset=UTF-8
  < X-Openstack-Request-Id: req-8df454b9-32e4-4356-a23c-5de4a60b49fa
  < Date: Mon, 24 Aug 2015 16:41:42 GMT
  < 
  <html>
   <head>
    <title>500 Internal Server Error</title>
   </head>
   <body>
    <h1>500 Internal Server Error</h1>
    The server has either erred or is incapable of performing the requested operation.<br /><br />
   </body>

  Expected:
  400

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


References