)]}'
{"keystone/common/ldap/core.py":[{"author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"change_message_id":"e810dae0e4f0e04f2b886e8104282308207fadaa","unresolved":false,"context_lines":[{"line_number":145,"context_line":"def prep_case_insensitive(value):"},{"line_number":146,"context_line":"    \"\"\"Prepare a string for case-insensitive comparison."},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    This is defined in RFC4518. For simplicity, all this function does is"},{"line_number":149,"context_line":"    lowercase all the characters and compress series of spaces."},{"line_number":150,"context_line":"    \"\"\""},{"line_number":151,"context_line":"    value \u003d re.sub(r\u0027\\s+\u0027, \u0027 \u0027, \u0027 \u0027 + value.lower() + \u0027 \u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_e508cc93","line":148,"updated":"2014-05-21 15:36:32.000000000","message":"White space folding for case ignore matching is defined in RFC 2252, not RFC 4518, right?","commit_id":"4ee9093b0431e4dcdc40bcd5f65475722dac3a95"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f4f150c1549393f7b2b61ecb4428f6960c58be07","unresolved":false,"context_lines":[{"line_number":145,"context_line":"def prep_case_insensitive(value):"},{"line_number":146,"context_line":"    \"\"\"Prepare a string for case-insensitive comparison."},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    This is defined in RFC4518. For simplicity, all this function does is"},{"line_number":149,"context_line":"    lowercase all the characters and compress series of spaces."},{"line_number":150,"context_line":"    \"\"\""},{"line_number":151,"context_line":"    value \u003d re.sub(r\u0027\\s+\u0027, \u0027 \u0027, \u0027 \u0027 + value.lower() + \u0027 \u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_eb1c1d7a","line":148,"in_reply_to":"7adec928_e508cc93","updated":"2014-05-21 19:45:36.000000000","message":"RFC 2252 is obsolete according to http://tools.ietf.org/html/rfc2252\n\nRFC 4518 describes folding in http://tools.ietf.org/html/rfc4518#section-2.6.1","commit_id":"4ee9093b0431e4dcdc40bcd5f65475722dac3a95"},{"author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"change_message_id":"e810dae0e4f0e04f2b886e8104282308207fadaa","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    This is defined in RFC4518. For simplicity, all this function does is"},{"line_number":149,"context_line":"    lowercase all the characters and compress series of spaces."},{"line_number":150,"context_line":"    \"\"\""},{"line_number":151,"context_line":"    value \u003d re.sub(r\u0027\\s+\u0027, \u0027 \u0027, \u0027 \u0027 + value.lower() + \u0027 \u0027)"},{"line_number":152,"context_line":"    return value"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_c5ed9090","line":151,"updated":"2014-05-21 15:36:32.000000000","message":"RFC 2252 says:\n\nWhen performing the caseIgnoreMatch, caseIgnoreListMatch,\ntelephoneNumberMatch, caseExactIA5Match and caseIgnoreIA5Match,\nmultiple adjoining whitespace characters are treated the same as an\nindividual space, and leading and trailing whitespace is ignored.\n\nSo wouldn\u0027t this be clearer if it were value.strip().lower() instead of  \u0027 \u0027 + value.lower() + \u0027 \u0027\n\nYour code has the correct semantic result but it seems to suggest there should be a leading and trailing space.","commit_id":"4ee9093b0431e4dcdc40bcd5f65475722dac3a95"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f4f150c1549393f7b2b61ecb4428f6960c58be07","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    This is defined in RFC4518. For simplicity, all this function does is"},{"line_number":149,"context_line":"    lowercase all the characters and compress series of spaces."},{"line_number":150,"context_line":"    \"\"\""},{"line_number":151,"context_line":"    value \u003d re.sub(r\u0027\\s+\u0027, \u0027 \u0027, \u0027 \u0027 + value.lower() + \u0027 \u0027)"},{"line_number":152,"context_line":"    return value"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_760f142f","line":151,"in_reply_to":"7adec928_c5ed9090","updated":"2014-05-21 19:45:36.000000000","message":"I\u0027ll implement it this way instead since it should wind up being the same. Plus I didn\u0027t even do it right since it says a single space should turn into 2 spaces.","commit_id":"4ee9093b0431e4dcdc40bcd5f65475722dac3a95"},{"author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"change_message_id":"e810dae0e4f0e04f2b886e8104282308207fadaa","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    return value"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"def is_ava_equal(attribute_type, val1, val2):"},{"line_number":156,"context_line":"    \"\"\"Returns True iff the AVAs are equal."},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    When comparing AVAs, the equality matching rule for the attribute type"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_48951787","line":155,"updated":"2014-05-21 15:36:32.000000000","message":"is_ava_equal is a misleading name, it suggests it is comparing both the type and the value when in fact it\u0027s comparing only the value from the ava. How about if it were called is_ava_value_equal instead?","commit_id":"4ee9093b0431e4dcdc40bcd5f65475722dac3a95"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f4f150c1549393f7b2b61ecb4428f6960c58be07","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    return value"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"def is_ava_equal(attribute_type, val1, val2):"},{"line_number":156,"context_line":"    \"\"\"Returns True iff the AVAs are equal."},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    When comparing AVAs, the equality matching rule for the attribute type"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_914aea53","line":155,"in_reply_to":"7adec928_48951787","updated":"2014-05-21 19:45:36.000000000","message":"Done. Changed the name to is_ava_value_equal.","commit_id":"4ee9093b0431e4dcdc40bcd5f65475722dac3a95"},{"author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"change_message_id":"e810dae0e4f0e04f2b886e8104282308207fadaa","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    return True"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"def is_dn_equal(dn1, dn2):"},{"line_number":207,"context_line":"    \"\"\"Returns True iff the DNs are equal."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    Two DNs are equal if they\u0027ve got the same number of RDNs and if the RDNs"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_486c3737","line":206,"updated":"2014-05-21 15:36:32.000000000","message":"This function must accept only parameters which are in the form returned by str2dn(), a list of list of 3-tuples, a somewhat obscure format. I\u0027m afraid someone seeing a function named is_dn_equal() might think they could pass strings as the 2 DN\u0027s. I suggest doing a isinstance(dn1, list) check before comparing the lengths and adding a :param: doc that clearly states the requirement. Note if someone does pass strings and the strings do not have equal length no exeception will be raised. Note, it\u0027s entirely possible for the 2 string representations to have unequal lengths but for the DN\u0027s compare as equal due to factors such as escaping, white space folding, etc.","commit_id":"4ee9093b0431e4dcdc40bcd5f65475722dac3a95"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f4f150c1549393f7b2b61ecb4428f6960c58be07","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    return True"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"def is_dn_equal(dn1, dn2):"},{"line_number":207,"context_line":"    \"\"\"Returns True iff the DNs are equal."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    Two DNs are equal if they\u0027ve got the same number of RDNs and if the RDNs"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_ff169454","line":206,"in_reply_to":"7adec928_486c3737","updated":"2014-05-21 19:45:36.000000000","message":"Good idea. I changed it to convert a non-list (str) DN to a parsed DN.","commit_id":"4ee9093b0431e4dcdc40bcd5f65475722dac3a95"},{"author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"change_message_id":"e810dae0e4f0e04f2b886e8104282308207fadaa","unresolved":false,"context_lines":[{"line_number":226,"context_line":"def is_dn_str_equal(dn_str_1, dn_str_2):"},{"line_number":227,"context_line":"    \"\"\"Returns True iff the DNs are equal."},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    Note that this function uses is_dn_equal to compare DNs so the"},{"line_number":230,"context_line":"    limitations of that function apply here."},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_a84a1baa","line":229,"updated":"2014-05-21 15:36:32.000000000","message":"Better doc needed, say what it does, not what the code does.","commit_id":"4ee9093b0431e4dcdc40bcd5f65475722dac3a95"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f4f150c1549393f7b2b61ecb4428f6960c58be07","unresolved":false,"context_lines":[{"line_number":226,"context_line":"def is_dn_str_equal(dn_str_1, dn_str_2):"},{"line_number":227,"context_line":"    \"\"\"Returns True iff the DNs are equal."},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    Note that this function uses is_dn_equal to compare DNs so the"},{"line_number":230,"context_line":"    limitations of that function apply here."},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_49e35605","line":229,"in_reply_to":"7adec928_a84a1baa","updated":"2014-05-21 19:45:36.000000000","message":"I got rid of this function since is_dn_equal handles both cases.","commit_id":"4ee9093b0431e4dcdc40bcd5f65475722dac3a95"},{"author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"change_message_id":"e810dae0e4f0e04f2b886e8104282308207fadaa","unresolved":false,"context_lines":[{"line_number":234,"context_line":"    return is_dn_equal(ldap.dn.str2dn(dn_str_1), ldap.dn.str2dn(dn_str_2))"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"def is_dn_under(descendant_dn, dn):"},{"line_number":238,"context_line":"    \"\"\"Returns True iff the descendant_dn is under the dn.\"\"\""},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    if len(descendant_dn) \u003c\u003d len(dn):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_e8c0a3e2","line":237,"updated":"2014-05-21 15:36:32.000000000","message":"Same issues as is_dn_equal, you need to clarify the parameters are list of list of 3-tuples, not strings. Shouldn\u0027t there be a version of this that accepts strings?\n\nJust a nit, not sure it matters, but I might have called this dn_startswith.","commit_id":"4ee9093b0431e4dcdc40bcd5f65475722dac3a95"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f4f150c1549393f7b2b61ecb4428f6960c58be07","unresolved":false,"context_lines":[{"line_number":234,"context_line":"    return is_dn_equal(ldap.dn.str2dn(dn_str_1), ldap.dn.str2dn(dn_str_2))"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"def is_dn_under(descendant_dn, dn):"},{"line_number":238,"context_line":"    \"\"\"Returns True iff the descendant_dn is under the dn.\"\"\""},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    if len(descendant_dn) \u003c\u003d len(dn):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_42640be5","line":237,"in_reply_to":"7adec928_e8c0a3e2","updated":"2014-05-21 19:45:36.000000000","message":"Done. Changed this to accept string or parsed DN, and changed the name.","commit_id":"4ee9093b0431e4dcdc40bcd5f65475722dac3a95"},{"author":{"_account_id":9098,"name":"Nathan Kinder","email":"nkinder@redhat.com","username":"nkinder"},"change_message_id":"9569b37ab8faf842d644b0df76779e382b73e546","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"def is_ava_value_equal(attribute_type, val1, val2):"},{"line_number":157,"context_line":"    \"\"\"Returns True iff the AVAs are equal."},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    When comparing AVAs, the equality matching rule for the attribute type"},{"line_number":160,"context_line":"    should be taken into consideration. For simplicity, this implementation"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_4ee35405","line":157,"updated":"2014-05-21 22:28:46.000000000","message":"iff \u003e if","commit_id":"45f010950c665e85fefb002785b5273d4f3ef22c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f4485dc6d829d6c584023631aab1b76668694bd2","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"def is_ava_value_equal(attribute_type, val1, val2):"},{"line_number":157,"context_line":"    \"\"\"Returns True iff the AVAs are equal."},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    When comparing AVAs, the equality matching rule for the attribute type"},{"line_number":160,"context_line":"    should be taken into consideration. For simplicity, this implementation"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_0ed6acc5","line":157,"in_reply_to":"7adec928_4ee35405","updated":"2014-05-21 22:31:43.000000000","message":"will change these to if and only if.","commit_id":"45f010950c665e85fefb002785b5273d4f3ef22c"},{"author":{"_account_id":9098,"name":"Nathan Kinder","email":"nkinder@redhat.com","username":"nkinder"},"change_message_id":"9569b37ab8faf842d644b0df76779e382b73e546","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"def is_rdn_equal(rdn1, rdn2):"},{"line_number":172,"context_line":"    \"\"\"Returns True iff the RDNs are equal."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    * RDNs must have the same number of AVAs."},{"line_number":175,"context_line":"    * Each AVA of the RDNs must be the equal for the same attribute type. The"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_0ee22c03","line":172,"updated":"2014-05-21 22:28:46.000000000","message":"iff \u003e if","commit_id":"45f010950c665e85fefb002785b5273d4f3ef22c"},{"author":{"_account_id":9098,"name":"Nathan Kinder","email":"nkinder@redhat.com","username":"nkinder"},"change_message_id":"9569b37ab8faf842d644b0df76779e382b73e546","unresolved":false,"context_lines":[{"line_number":205,"context_line":""},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"def is_dn_equal(dn1, dn2):"},{"line_number":208,"context_line":"    \"\"\"Returns True iff the DNs are equal."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    Two DNs are equal if they\u0027ve got the same number of RDNs and if the RDNs"},{"line_number":211,"context_line":"    are the same at each position. See RFC4517."}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_eedc2049","line":208,"updated":"2014-05-21 22:28:46.000000000","message":"iff \u003e if","commit_id":"45f010950c665e85fefb002785b5273d4f3ef22c"},{"author":{"_account_id":9098,"name":"Nathan Kinder","email":"nkinder@redhat.com","username":"nkinder"},"change_message_id":"9569b37ab8faf842d644b0df76779e382b73e546","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"def dn_startswith(descendant_dn, dn):"},{"line_number":236,"context_line":"    \"\"\"Returns True iff the descendant_dn is under the dn."},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    :param descendant_dn: Either a string DN or a DN parsed by ldap.dn.str2dn."},{"line_number":239,"context_line":"    :param dn: Either a string DN or a DN parsed by ldap.dn.str2dn."}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_0e5dcce9","line":236,"updated":"2014-05-21 22:28:46.000000000","message":"iff \u003e if","commit_id":"45f010950c665e85fefb002785b5273d4f3ef22c"},{"author":{"_account_id":9098,"name":"Nathan Kinder","email":"nkinder@redhat.com","username":"nkinder"},"change_message_id":"9569b37ab8faf842d644b0df76779e382b73e546","unresolved":false,"context_lines":[{"line_number":382,"context_line":"    def search_ext(self, base, scope,"},{"line_number":383,"context_line":"                   filterstr\u003d\u0027(objectClass\u003d*)\u0027, attrlist\u003dNone, attrsonly\u003d0,"},{"line_number":384,"context_line":"                   serverctrls\u003dNone, clientctrls\u003dNone,"},{"line_number":385,"context_line":"                   timeout\u003d-2, sizelimit\u003d0):"},{"line_number":386,"context_line":"        raise exception.NotImplemented()"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_ae1138b1","line":385,"updated":"2014-05-21 22:28:46.000000000","message":"Why -2 here?  This seems unrelated, and I thought that all negative values mean no limit.","commit_id":"45f010950c665e85fefb002785b5273d4f3ef22c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f4485dc6d829d6c584023631aab1b76668694bd2","unresolved":false,"context_lines":[{"line_number":382,"context_line":"    def search_ext(self, base, scope,"},{"line_number":383,"context_line":"                   filterstr\u003d\u0027(objectClass\u003d*)\u0027, attrlist\u003dNone, attrsonly\u003d0,"},{"line_number":384,"context_line":"                   serverctrls\u003dNone, clientctrls\u003dNone,"},{"line_number":385,"context_line":"                   timeout\u003d-2, sizelimit\u003d0):"},{"line_number":386,"context_line":"        raise exception.NotImplemented()"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_aec69814","line":385,"in_reply_to":"7adec928_ae1138b1","updated":"2014-05-21 22:31:43.000000000","message":"It is unrelated.","commit_id":"45f010950c665e85fefb002785b5273d4f3ef22c"}]}
