)]}'
{"barbican/api/controllers/orders.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"2ba2d140766f10298c980edaa057636e61c3fc19","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        # actually does a lookup in the database regardless of the RBAC policy"},{"line_number":144,"context_line":"        # check, the execution only gets here if authentication of the user was"},{"line_number":145,"context_line":"        # previously successful."},{"line_number":146,"context_line":"        try:"},{"line_number":147,"context_line":"            controllers.assert_is_valid_uuid_from_uri(order_id)"},{"line_number":148,"context_line":"        except exception.InvalidUUIDInURI:"},{"line_number":149,"context_line":"            _order_not_found()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_28a894da","line":146,"updated":"2016-03-09 23:19:03.000000000","message":"My preference is to reduce the amount of try/except blocks in the controllers, and instead let an @controllers.handle_exceptions(u._(\u0027Lookup secret\u0027)) annotation/decorator handle this.","commit_id":"6aa617aca3e45b307510495e8c24ad85148ed9c1"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"f84eba7ec53a0f6b575dba78b9ee6a90a2562f62","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        # actually does a lookup in the database regardless of the RBAC policy"},{"line_number":144,"context_line":"        # check, the execution only gets here if authentication of the user was"},{"line_number":145,"context_line":"        # previously successful."},{"line_number":146,"context_line":"        try:"},{"line_number":147,"context_line":"            controllers.assert_is_valid_uuid_from_uri(order_id)"},{"line_number":148,"context_line":"        except exception.InvalidUUIDInURI:"},{"line_number":149,"context_line":"            _order_not_found()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_83db5e7b","line":146,"in_reply_to":"5aef4532_07177548","updated":"2016-03-10 16:48:48.000000000","message":"Good point.  This could definitely be rewritten to be more pythonic.  I\u0027m not even sure we need the InvalidUUIDInURI exception if we\u0027re trying to avoid try/except blocks.","commit_id":"6aa617aca3e45b307510495e8c24ad85148ed9c1"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"afce53cb3a4ca48250499343811fee0d9d1e634a","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        # actually does a lookup in the database regardless of the RBAC policy"},{"line_number":144,"context_line":"        # check, the execution only gets here if authentication of the user was"},{"line_number":145,"context_line":"        # previously successful."},{"line_number":146,"context_line":"        try:"},{"line_number":147,"context_line":"            controllers.assert_is_valid_uuid_from_uri(order_id)"},{"line_number":148,"context_line":"        except exception.InvalidUUIDInURI:"},{"line_number":149,"context_line":"            _order_not_found()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_07177548","line":146,"in_reply_to":"5aef4532_28a894da","updated":"2016-03-10 09:26:00.000000000","message":"I agree with John here. It would be much cleaner. On the other hand, InvalidUUIDInURI is already inheriting from BarbicanHTTPException so it already has the 404 that\u0027s needed.","commit_id":"6aa617aca3e45b307510495e8c24ad85148ed9c1"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"87c0d67d093a66b52c5c13bb10ba36753c78332f","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        # actually does a lookup in the database regardless of the RBAC policy"},{"line_number":143,"context_line":"        # check, the execution only gets here if authentication of the user was"},{"line_number":144,"context_line":"        # previously successful."},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        ctx \u003d controllers._get_barbican_context(pecan.request)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        order \u003d self.order_repo.get(entity_id\u003dorder_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1af94dfe_46d98c56","line":145,"updated":"2016-03-18 12:31:21.000000000","message":"I\u0027m actually unsure about taking off this uuid validation. The whole purpose was to reduce the values that can be given for id\u0027s, so only UUIDs could be given and no other malicious values.","commit_id":"be35a705b074a381e0b222531fb21f8981c235e1"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"c9ee6fb10d2e0670ab397fb4e46623a74ecb0697","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        # actually does a lookup in the database regardless of the RBAC policy"},{"line_number":143,"context_line":"        # check, the execution only gets here if authentication of the user was"},{"line_number":144,"context_line":"        # previously successful."},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        ctx \u003d controllers._get_barbican_context(pecan.request)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        order \u003d self.order_repo.get(entity_id\u003dorder_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1af94dfe_0c803ef4","line":145,"in_reply_to":"1af94dfe_46d98c56","updated":"2016-03-18 14:17:49.000000000","message":"I trust that SQLAlchemy will be doing the right thing as far as injection vulnerabilities.\n\nI\u0027d also think that kind of validation should be done in the repo class so we don\u0027t have to opt in for every controller.","commit_id":"be35a705b074a381e0b222531fb21f8981c235e1"}],"barbican/api/controllers/secrets.py":[{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"11ff32e51578b83ec7c599d1bd87d3aa30c1df54","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        # actually does a lookup in the database regardless of the RBAC policy"},{"line_number":245,"context_line":"        # check, the execution only gets here if authentication of the user was"},{"line_number":246,"context_line":"        # previously successful."},{"line_number":247,"context_line":"        if not self._is_valid_uuid_from_uri(secret_id):"},{"line_number":248,"context_line":"            _secret_not_found()"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        secret \u003d self.secret_repo.get_secret_by_id("}],"source_content_type":"text/x-python","patch_set":4,"id":"5aef4532_4325ba08","line":247,"updated":"2016-03-11 06:40:29.000000000","message":"Although this all works fine, wouldn\u0027t it be better for this line and the next to be removed and then the error will be caught in line 250-251.\n\nThat way it is consistent with https://github.com/openstack/barbican/blob/master/barbican/api/controllers/containers.py#L119-L125\n\nThis implementation: http://paste.openstack.org/show/490095/\nMaster, just removing line 247 here and the same part in orders: http://paste.openstack.org/show/490097/","commit_id":"9b1cbe53cce035c57259888dc15e7dac8cf8fbdb"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"26b30c445a8a797e5904fc9ffa8d907795a2bd1c","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        # actually does a lookup in the database regardless of the RBAC policy"},{"line_number":245,"context_line":"        # check, the execution only gets here if authentication of the user was"},{"line_number":246,"context_line":"        # previously successful."},{"line_number":247,"context_line":"        if not self._is_valid_uuid_from_uri(secret_id):"},{"line_number":248,"context_line":"            _secret_not_found()"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        secret \u003d self.secret_repo.get_secret_by_id("}],"source_content_type":"text/x-python","patch_set":4,"id":"5aef4532_ecd4b3be","line":247,"in_reply_to":"5aef4532_4325ba08","updated":"2016-03-11 08:30:12.000000000","message":"You make a good point.  I agree, less code is better.  I\u0027ll rework this patch to remove these.","commit_id":"9b1cbe53cce035c57259888dc15e7dac8cf8fbdb"}]}
