)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11045,"name":"Bob Thyne","email":"bob.thyne@hp.com","username":"bobt"},"change_message_id":"d6aea33cd4ad377e8e0e13c02b7d66ec7e7cef4e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Morgan Fainberg \u003cmorgan.fainberg@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-06-06 10:27:16 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Hide details when not in debug on Conflict (HTTP 409)"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When not running in debug mode, Keystone should not leak details"},{"line_number":10,"context_line":"of the conflict (specifically SQL Statements or LDAP queries)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1ae5cdf2_9d2a162b","line":7,"updated":"2014-06-06 19:13:46.000000000","message":"nik: The above summary is fine although I would prefer:\n\nHide details of HTTP 409 Errors unless in debug mode","commit_id":"ef4687152866d5f46215346746d7c531b237955b"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"f917a18098c292da2781ad7b6af63ce258f91812","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Morgan Fainberg \u003cmorgan.fainberg@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-06-06 10:27:16 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Hide details when not in debug on Conflict (HTTP 409)"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When not running in debug mode, Keystone should not leak details"},{"line_number":10,"context_line":"of the conflict (specifically SQL Statements or LDAP queries)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1ae5cdf2_9dba166d","line":7,"in_reply_to":"1ae5cdf2_9d2a162b","updated":"2014-06-06 19:37:30.000000000","message":"Done","commit_id":"ef4687152866d5f46215346746d7c531b237955b"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"df3857a91162c30ab0f40d6a58b733b6af8694e4","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Hide details of HTTP 409 errors unless in debug"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When not running in debug mode, Keystone should not leak details"},{"line_number":10,"context_line":"of the conflict (specifically SQL Statements or LDAP queries)."},{"line_number":11,"context_line":"Conflict errors (HTTP 409) no longer expose internal details when"},{"line_number":12,"context_line":"not running in debug mode."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1ae5cdf2_70687fba","line":9,"updated":"2014-06-18 23:16:50.000000000","message":"even in debug mode keystone shouldn\u0027t leak SQL statements or LDAP queries.","commit_id":"55ea97bb45886c7685811b2e48aa90813016bcd8"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"e41c68f72ed294e3888f8b10ab3a6d41461ad8dd","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Hide details of HTTP 409 errors unless in debug"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When not running in debug mode, Keystone should not leak details"},{"line_number":10,"context_line":"of the conflict (specifically SQL Statements or LDAP queries)."},{"line_number":11,"context_line":"Conflict errors (HTTP 409) no longer expose internal details when"},{"line_number":12,"context_line":"not running in debug mode."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1ae5cdf2_4e62adad","line":9,"in_reply_to":"1ae5cdf2_70687fba","updated":"2014-06-22 03:35:21.000000000","message":"The issue is that the exception (internal) is what is passed back in, do we want to just squash all exception details in this case? Not a big deal if that is the direction we want to go [eliminate the \u0027details\u0027 of the exception in Conflict cases instead of scrubbing when in non-debug)","commit_id":"55ea97bb45886c7685811b2e48aa90813016bcd8"}],"keystone/assignment/backends/ldap.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"d58986a2c0b7950529e50953d862a84a4dca575d","unresolved":false,"context_lines":[{"line_number":629,"context_line":"        try:"},{"line_number":630,"context_line":"            old_name \u003d self.get_by_name(role[\u0027name\u0027])"},{"line_number":631,"context_line":"            raise exception.Conflict("},{"line_number":632,"context_line":"                type\u003d\u0027role grant\u0027,"},{"line_number":633,"context_line":"                details\u003d_(\u0027Cannot duplicate name %s\u0027) % old_name)"},{"line_number":634,"context_line":"        except exception.NotFound:"},{"line_number":635,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_eb9ca2c2","line":632,"updated":"2014-06-11 20:10:14.000000000","message":"role assignment","commit_id":"35dd91e1caf7518aefed29d6fc536c23cdfc459d"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"4f718377ee4fe376290d28f27df5151aed3de169","unresolved":false,"context_lines":[{"line_number":629,"context_line":"        try:"},{"line_number":630,"context_line":"            old_name \u003d self.get_by_name(role[\u0027name\u0027])"},{"line_number":631,"context_line":"            raise exception.Conflict("},{"line_number":632,"context_line":"                type\u003d\u0027role grant\u0027,"},{"line_number":633,"context_line":"                details\u003d_(\u0027Cannot duplicate name %s\u0027) % old_name)"},{"line_number":634,"context_line":"        except exception.NotFound:"},{"line_number":635,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_3e1321b9","line":632,"in_reply_to":"1ae5cdf2_eb9ca2c2","updated":"2014-06-12 00:03:35.000000000","message":"Done in next patch.","commit_id":"35dd91e1caf7518aefed29d6fc536c23cdfc459d"}],"keystone/exception.py":[{"author":{"_account_id":11045,"name":"Bob Thyne","email":"bob.thyne@hp.com","username":"bobt"},"change_message_id":"d6aea33cd4ad377e8e0e13c02b7d66ec7e7cef4e","unresolved":false,"context_lines":[{"line_number":273,"context_line":"    def _build_message(self, message, **kwargs):"},{"line_number":274,"context_line":"            if not CONF.debug:"},{"line_number":275,"context_line":"                # NOTE(morganfainberg): Do not expose the details unless debug"},{"line_number":276,"context_line":"                # is enavled. \u0027details\u0027 could expose the underlying SQL queries"},{"line_number":277,"context_line":"                # and should not be exposed under normal production operation"},{"line_number":278,"context_line":"                kwargs[\u0027details\u0027] \u003d \u0027\u0027"},{"line_number":279,"context_line":"            return super(Conflict, self)._build_message(message, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_fa56c029","line":276,"updated":"2014-06-06 19:13:46.000000000","message":"nik: enabled","commit_id":"ef4687152866d5f46215346746d7c531b237955b"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"f917a18098c292da2781ad7b6af63ce258f91812","unresolved":false,"context_lines":[{"line_number":273,"context_line":"    def _build_message(self, message, **kwargs):"},{"line_number":274,"context_line":"            if not CONF.debug:"},{"line_number":275,"context_line":"                # NOTE(morganfainberg): Do not expose the details unless debug"},{"line_number":276,"context_line":"                # is enavled. \u0027details\u0027 could expose the underlying SQL queries"},{"line_number":277,"context_line":"                # and should not be exposed under normal production operation"},{"line_number":278,"context_line":"                kwargs[\u0027details\u0027] \u003d \u0027\u0027"},{"line_number":279,"context_line":"            return super(Conflict, self)._build_message(message, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_7db54a7d","line":276,"in_reply_to":"1ae5cdf2_fa56c029","updated":"2014-06-06 19:37:30.000000000","message":"Done in next patch.","commit_id":"ef4687152866d5f46215346746d7c531b237955b"},{"author":{"_account_id":11387,"name":"Sam Leong","email":"chio-fai-sam.leong@hpe.com","username":"Chioleong"},"change_message_id":"0815dae5e5dc9ee24e3e86c2c957ce59c6612fc3","unresolved":false,"context_lines":[{"line_number":269,"context_line":"class Conflict(Error):"},{"line_number":270,"context_line":"    message_format \u003d _(\"Conflict occurred attempting to store %(type)s.\""},{"line_number":271,"context_line":"                       \" %(details)s\")"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    def _build_message(self, message, **kwargs):"},{"line_number":274,"context_line":"            if not CONF.debug:"},{"line_number":275,"context_line":"                # NOTE(morganfainberg): Do not expose the details unless debug"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_8178ec90","line":272,"updated":"2014-06-07 08:42:31.000000000","message":"This method may go to the bottom of the class so that the class members can be grouped together.","commit_id":"7e6f72ba9d67a0ed5d94d8dbe9dcbd8588294d13"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"16d8ce1ac161a5b5d41479b678db0b5c0bfb1311","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                       \" IdentityProvider, %(idp_id)s\")"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"class Conflict(Error):"},{"line_number":270,"context_line":"    message_format \u003d _(\"Conflict occurred attempting to store %(type)s.\""},{"line_number":271,"context_line":"                       \" %(details)s\")"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_261969d7","line":269,"updated":"2014-06-11 16:08:32.000000000","message":"Can you accomplish this somehow by extending SecurityError instead? maybe refactor calls to raise Conflict to just pass the details as the entirety of the message?","commit_id":"b9205eeba761279b3c368f6d4fd7f73f12c8be3c"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"152617f525d6cd1b7951cb940fe25e18c2da7e09","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                       \" IdentityProvider, %(idp_id)s\")"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"class Conflict(Error):"},{"line_number":270,"context_line":"    message_format \u003d _(\"Conflict occurred attempting to store %(type)s.\""},{"line_number":271,"context_line":"                       \" %(details)s\")"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_3f97a83b","line":269,"in_reply_to":"1ae5cdf2_261969d7","updated":"2014-06-11 17:37:11.000000000","message":"The issue was that some Conflict raises specified a message instead of a \u0027type\u0027 and \u0027details\u0027. I\u0027ll work to make all raises of Conflict consistent instead.\n\nI\u0027ll see if I can make this work more like that. Also, realize securityerror does the inverse.\n\nSecurityError falls back to the fixed message_format if debug !\u003d True, In this case we want to obscure the data in details not require them.","commit_id":"b9205eeba761279b3c368f6d4fd7f73f12c8be3c"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"16d8ce1ac161a5b5d41479b678db0b5c0bfb1311","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                       \" %(details)s\")"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    def _build_message(self, message, **kwargs):"},{"line_number":274,"context_line":"            if not CONF.debug:"},{"line_number":275,"context_line":"                # NOTE(morganfainberg): Do not expose the details unless debug"},{"line_number":276,"context_line":"                # is enabled. \u0027details\u0027 could expose the underlying SQL queries"},{"line_number":277,"context_line":"                # and should not be exposed under normal production operation"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_a63d792d","line":274,"updated":"2014-06-11 16:08:32.000000000","message":"bonus indentation?","commit_id":"b9205eeba761279b3c368f6d4fd7f73f12c8be3c"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"152617f525d6cd1b7951cb940fe25e18c2da7e09","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                       \" %(details)s\")"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    def _build_message(self, message, **kwargs):"},{"line_number":274,"context_line":"            if not CONF.debug:"},{"line_number":275,"context_line":"                # NOTE(morganfainberg): Do not expose the details unless debug"},{"line_number":276,"context_line":"                # is enabled. \u0027details\u0027 could expose the underlying SQL queries"},{"line_number":277,"context_line":"                # and should not be exposed under normal production operation"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_9fa19c96","line":274,"in_reply_to":"1ae5cdf2_a63d792d","updated":"2014-06-11 17:37:11.000000000","message":"But...\n        I\n            Like\n        indenting\n    things\n\nfixed in next patch.","commit_id":"b9205eeba761279b3c368f6d4fd7f73f12c8be3c"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"d58986a2c0b7950529e50953d862a84a4dca575d","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def _build_message(self, message, **kwargs):"},{"line_number":136,"context_line":"        \"\"\"Only returns detailed messages in debug mode.\"\"\""},{"line_number":137,"context_line":"        if self.always_use_message_format:"},{"line_number":138,"context_line":"            # Some cases the SecurityError should never accept a custom message"},{"line_number":139,"context_line":"            message \u003d self.message_format"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_cb29a69c","line":137,"updated":"2014-06-11 20:10:14.000000000","message":"? \n\n  if message and self.always_use_message_format:\n    # Some cases the SecurityError should never accept a custom message\n    LOG.warning(_(\u0027custom messages are not allowed here (programmer error)\u0027))","commit_id":"35dd91e1caf7518aefed29d6fc536c23cdfc459d"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"4f718377ee4fe376290d28f27df5151aed3de169","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def _build_message(self, message, **kwargs):"},{"line_number":136,"context_line":"        \"\"\"Only returns detailed messages in debug mode.\"\"\""},{"line_number":137,"context_line":"        if self.always_use_message_format:"},{"line_number":138,"context_line":"            # Some cases the SecurityError should never accept a custom message"},{"line_number":139,"context_line":"            message \u003d self.message_format"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_7e092983","line":137,"in_reply_to":"1ae5cdf2_cb29a69c","updated":"2014-06-12 00:03:35.000000000","message":"Works for me. in next patch.","commit_id":"35dd91e1caf7518aefed29d6fc536c23cdfc459d"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"df3857a91162c30ab0f40d6a58b733b6af8694e4","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                       \" IdentityProvider, %(idp_id)s\")"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"class Conflict(SecurityError):"},{"line_number":291,"context_line":"    message_format \u003d _(\"Conflict occurred attempting to store %(type)s.\""},{"line_number":292,"context_line":"                       \" %(details)s\")"},{"line_number":293,"context_line":"    sanitize_replacement_values \u003d frozenset([\u0027details\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_7096bf95","line":290,"updated":"2014-06-18 23:16:50.000000000","message":"If Conflict is a SecurityError then it seems like every exception should be a SecurityError, at which point, why not change Error to work like SecurityError?","commit_id":"55ea97bb45886c7685811b2e48aa90813016bcd8"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"e41c68f72ed294e3888f8b10ab3a6d41461ad8dd","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                       \" IdentityProvider, %(idp_id)s\")"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"class Conflict(SecurityError):"},{"line_number":291,"context_line":"    message_format \u003d _(\"Conflict occurred attempting to store %(type)s.\""},{"line_number":292,"context_line":"                       \" %(details)s\")"},{"line_number":293,"context_line":"    sanitize_replacement_values \u003d frozenset([\u0027details\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_8e5835fa","line":290,"in_reply_to":"1ae5cdf2_7096bf95","updated":"2014-06-22 03:35:21.000000000","message":"Fair point. Asked a question re: commit message that could change the implementation here.\n\nI would agree with changing all exceptions to have the Security mechanisms. Would make enforcing less data leakage easier in the future.","commit_id":"55ea97bb45886c7685811b2e48aa90813016bcd8"}],"keystone/tests/test_exception.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"6177c10e41f928112319ef04bef9b0633909a477","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"class SecurityErrorTestCase(ExceptionTestCase):"},{"line_number":157,"context_line":"    \"\"\"Tests whether security-related info is exposed to the API user.\"\"\""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def test_unauthorized_exposure(self):"},{"line_number":160,"context_line":"        self.config_fixture.config(debug\u003dFalse)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_4b4fccbe","line":158,"updated":"2014-06-16 19:27:06.000000000","message":"is this for pep8?","commit_id":"55ea97bb45886c7685811b2e48aa90813016bcd8"}]}
