)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"5990624c2cc44d204c4710a41a591e97ae22bc81","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Sirisha Devineni \u003csirisha_devineni@persistent.co.in\u003e"},{"line_number":5,"context_line":"CommitDate: 2012-09-28 21:42:47 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Returning proper error messages while associating not allocated floating IP"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Handled the FloatingIpNotFoundForAddress, NotAuthorized exceptions"},{"line_number":10,"context_line":"raised while associating floating IPs which are not allocated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAALH%2F%2FQP0%3D","line":7,"updated":"2012-09-28 14:21:08.000000000","message":"Your summary line is too long; try to get it to 50 characters and put the details in the body of the commit message.","commit_id":"3966d9f8872bf89309b5b2c3020504c788cbf520"}],"nova/api/openstack/compute/contrib/floating_ips.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"5990624c2cc44d204c4710a41a591e97ae22bc81","unresolved":false,"context_lines":[{"line_number":261,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":262,"context_line":"        except exception.FloatingIpNotFoundForAddress:"},{"line_number":263,"context_line":"            msg \u003d _(\u0027Floating ip not found for address %s\u0027) % address"},{"line_number":264,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":265,"context_line":"        except exception.NotAuthorized:"},{"line_number":266,"context_line":"            msg \u003d _(\u0027Not authorized for address %s\u0027) % address"},{"line_number":267,"context_line":"            raise webob.exc.HTTPUnauthorized(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FQPk%3D","line":264,"updated":"2012-09-28 14:21:08.000000000","message":"Why \"HTTPBadRequest\"?  I\u0027d have expected \"HTTPNotFound\", mapping to a 404, based on the message…","commit_id":"3966d9f8872bf89309b5b2c3020504c788cbf520"},{"author":{"_account_id":1749,"name":"Sirisha Devineni","email":"sirisha_devineni@persistent.co.in","username":"sirisha-devineni"},"change_message_id":"57cb856f9fa934b1729b4341c9f5960c157dddca","unresolved":false,"context_lines":[{"line_number":261,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":262,"context_line":"        except exception.FloatingIpNotFoundForAddress:"},{"line_number":263,"context_line":"            msg \u003d _(\u0027Floating ip not found for address %s\u0027) % address"},{"line_number":264,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":265,"context_line":"        except exception.NotAuthorized:"},{"line_number":266,"context_line":"            msg \u003d _(\u0027Not authorized for address %s\u0027) % address"},{"line_number":267,"context_line":"            raise webob.exc.HTTPUnauthorized(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FPdI%3D","line":264,"in_reply_to":"AAAALH%2F%2FQPk%3D","updated":"2012-10-01 05:26:58.000000000","message":"For bad address like strings and invalid address\u0027s also  returning the same error messages so projected it as HTTPBadRequest but 404 is also apt for this so changed it to HTTPNotFound.","commit_id":"3966d9f8872bf89309b5b2c3020504c788cbf520"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"5990624c2cc44d204c4710a41a591e97ae22bc81","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":265,"context_line":"        except exception.NotAuthorized:"},{"line_number":266,"context_line":"            msg \u003d _(\u0027Not authorized for address %s\u0027) % address"},{"line_number":267,"context_line":"            raise webob.exc.HTTPUnauthorized(explanation\u003dmsg)"},{"line_number":268,"context_line":"        except Exception:"},{"line_number":269,"context_line":"            msg \u003d _(\u0027Error. Unable to associate floating ip\u0027)"},{"line_number":270,"context_line":"            LOG.exception(msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FQPo%3D","line":267,"updated":"2012-09-28 14:21:08.000000000","message":"A caution here.  By reporting an \"HTTPUnauthorized\" here, we give a potential attacker an indication that the IP address is in use by someone, even when that IP address belongs to another tenant.  I\u0027d be tempted to make this report a 404 instead, to avoid that information leak—a basic tenant of security is to avoid giving away any information you don\u0027t have to.","commit_id":"3966d9f8872bf89309b5b2c3020504c788cbf520"},{"author":{"_account_id":1749,"name":"Sirisha Devineni","email":"sirisha_devineni@persistent.co.in","username":"sirisha-devineni"},"change_message_id":"57cb856f9fa934b1729b4341c9f5960c157dddca","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":265,"context_line":"        except exception.NotAuthorized:"},{"line_number":266,"context_line":"            msg \u003d _(\u0027Not authorized for address %s\u0027) % address"},{"line_number":267,"context_line":"            raise webob.exc.HTTPUnauthorized(explanation\u003dmsg)"},{"line_number":268,"context_line":"        except Exception:"},{"line_number":269,"context_line":"            msg \u003d _(\u0027Error. Unable to associate floating ip\u0027)"},{"line_number":270,"context_line":"            LOG.exception(msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FPdM%3D","line":267,"in_reply_to":"AAAALH%2F%2FQPo%3D","updated":"2012-10-01 05:26:58.000000000","message":"Agree, changed this to HTTPNotFound","commit_id":"3966d9f8872bf89309b5b2c3020504c788cbf520"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"7967d1064f2965d1131154d5b74c5ecafff0a64f","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":265,"context_line":"        except exception.NotAuthorized:"},{"line_number":266,"context_line":"            msg \u003d _(\u0027Not authorized for address %s\u0027) % address"},{"line_number":267,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":268,"context_line":"        except Exception:"},{"line_number":269,"context_line":"            msg \u003d _(\u0027Error. Unable to associate floating ip\u0027)"},{"line_number":270,"context_line":"            LOG.exception(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FPOk%3D","line":267,"updated":"2012-10-01 16:54:13.000000000","message":"Thanks, but you left the message the same.  What I would suggest is combining this with the previous block, i.e.:\n\n    except (exception.FloatingIpNotFoundForAddress,\n            exception.NotAuthorized):\n        msg \u003d _(\u0027Floating ip not found for address %s\u0027) % address\n        raise webob.exc.HTTPNotFound(explanation\u003dmsg)","commit_id":"449cffc108e5cd09611d855d06daa3c896ffd5ac"}]}
