)]}'
{"openstack_dashboard/dashboards/identity/users/forms.py":[{"author":{"_account_id":27822,"name":"pengyuesheng","email":"pengyuesheng@gohighsec.com","username":"pengyuesheng"},"change_message_id":"c2567f045dd854a8a5f9dfe874652b73b20b18a3","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from django.conf import settings"},{"line_number":24,"context_line":"from django.forms import ValidationError"},{"line_number":25,"context_line":"from django import http"},{"line_number":26,"context_line":"from django.utils.encoding import force_text"},{"line_number":27,"context_line":"from django.utils.translation import ugettext_lazy as _"},{"line_number":28,"context_line":"from django.views.decorators.debug import sensitive_variables"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_2f4f0293","line":26,"range":{"start_line":26,"start_character":0,"end_line":26,"end_character":44},"updated":"2019-07-29 03:44:13.000000000","message":"not need","commit_id":"85639f8167c4522f4a0a9c8ffcc0358fd0260562"},{"author":{"_account_id":27822,"name":"pengyuesheng","email":"pengyuesheng@gohighsec.com","username":"pengyuesheng"},"change_message_id":"c2567f045dd854a8a5f9dfe874652b73b20b18a3","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        except Exception as exc:"},{"line_number":332,"context_line":"            response \u003d exceptions.handle(request, ignore\u003dTrue)"},{"line_number":333,"context_line":"            match \u003d re.match((r\u0027The password does not match the \u0027"},{"line_number":334,"context_line":"                              \u0027requirements:(.*?) \\(HTTP 400\\)\u0027), str(exc),"},{"line_number":335,"context_line":"                             re.UNICODE | re.MULTILINE)"},{"line_number":336,"context_line":"            if match:"},{"line_number":337,"context_line":"                info \u003d match.group(1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_8f5f1640","line":334,"range":{"start_line":334,"start_character":50,"end_line":334,"end_character":51},"updated":"2019-07-29 03:44:13.000000000","message":"not need","commit_id":"85639f8167c4522f4a0a9c8ffcc0358fd0260562"},{"author":{"_account_id":27822,"name":"pengyuesheng","email":"pengyuesheng@gohighsec.com","username":"pengyuesheng"},"change_message_id":"c2567f045dd854a8a5f9dfe874652b73b20b18a3","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        except Exception as exc:"},{"line_number":332,"context_line":"            response \u003d exceptions.handle(request, ignore\u003dTrue)"},{"line_number":333,"context_line":"            match \u003d re.match((r\u0027The password does not match the \u0027"},{"line_number":334,"context_line":"                              \u0027requirements:(.*?) \\(HTTP 400\\)\u0027), str(exc),"},{"line_number":335,"context_line":"                             re.UNICODE | re.MULTILINE)"},{"line_number":336,"context_line":"            if match:"},{"line_number":337,"context_line":"                info \u003d match.group(1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_af5a124d","line":334,"range":{"start_line":334,"start_character":60,"end_line":334,"end_character":61},"updated":"2019-07-29 03:44:13.000000000","message":"not need","commit_id":"85639f8167c4522f4a0a9c8ffcc0358fd0260562"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"64551e821c4324fab02dfad2f2b5569361ae3ae0","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        except Exception as exc:"},{"line_number":332,"context_line":"            response \u003d exceptions.handle(request, ignore\u003dTrue)"},{"line_number":333,"context_line":"            match \u003d re.match((r\u0027The password does not match the \u0027"},{"line_number":334,"context_line":"                              \u0027requirements:(.*?) \\(HTTP 400\\)\u0027), str(exc),"},{"line_number":335,"context_line":"                             re.UNICODE | re.MULTILINE)"},{"line_number":336,"context_line":"            if match:"},{"line_number":337,"context_line":"                info \u003d match.group(1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_8d54fe22","line":334,"range":{"start_line":334,"start_character":60,"end_line":334,"end_character":61},"in_reply_to":"7faddb67_4dbb66c3","updated":"2019-07-29 08:28:47.000000000","message":"It\u0027s not, because unescaped parens have meaning inside a regular expression.","commit_id":"85639f8167c4522f4a0a9c8ffcc0358fd0260562"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"4de2fd9a0feb2cffa76af8a5d2b9f1eb5dfa1110","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        except Exception as exc:"},{"line_number":332,"context_line":"            response \u003d exceptions.handle(request, ignore\u003dTrue)"},{"line_number":333,"context_line":"            match \u003d re.match((r\u0027The password does not match the \u0027"},{"line_number":334,"context_line":"                              \u0027requirements:(.*?) \\(HTTP 400\\)\u0027), str(exc),"},{"line_number":335,"context_line":"                             re.UNICODE | re.MULTILINE)"},{"line_number":336,"context_line":"            if match:"},{"line_number":337,"context_line":"                info \u003d match.group(1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_ed6fb2c2","line":334,"range":{"start_line":334,"start_character":60,"end_line":334,"end_character":61},"in_reply_to":"7faddb67_af5a124d","updated":"2019-07-29 07:18:06.000000000","message":"Can you please elaborate on what you mean by \"not need\"?","commit_id":"85639f8167c4522f4a0a9c8ffcc0358fd0260562"},{"author":{"_account_id":27822,"name":"pengyuesheng","email":"pengyuesheng@gohighsec.com","username":"pengyuesheng"},"change_message_id":"b2298a8e15cf60bba3dd35b627c45d1768a41cdb","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        except Exception as exc:"},{"line_number":332,"context_line":"            response \u003d exceptions.handle(request, ignore\u003dTrue)"},{"line_number":333,"context_line":"            match \u003d re.match((r\u0027The password does not match the \u0027"},{"line_number":334,"context_line":"                              \u0027requirements:(.*?) \\(HTTP 400\\)\u0027), str(exc),"},{"line_number":335,"context_line":"                             re.UNICODE | re.MULTILINE)"},{"line_number":336,"context_line":"            if match:"},{"line_number":337,"context_line":"                info \u003d match.group(1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_4dbb66c3","line":334,"range":{"start_line":334,"start_character":60,"end_line":334,"end_character":61},"in_reply_to":"7faddb67_ed6fb2c2","updated":"2019-07-29 07:56:44.000000000","message":"I think adding escape characters here is superfluous","commit_id":"85639f8167c4522f4a0a9c8ffcc0358fd0260562"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"7a8037aa7cec15faa602a9239efdf47b863c5df9","unresolved":false,"context_lines":[{"line_number":329,"context_line":"                             _(\u0027User password has been updated successfully.\u0027))"},{"line_number":330,"context_line":"        except Exception as exc:"},{"line_number":331,"context_line":"            response \u003d exceptions.handle(request, ignore\u003dTrue)"},{"line_number":332,"context_line":"            match \u003d re.match((r\u0027The password does not match the \u0027"},{"line_number":333,"context_line":"                              \u0027requirements:(.*?) [(]HTTP 400[)]\u0027), str(exc),"},{"line_number":334,"context_line":"                             re.UNICODE | re.MULTILINE)"},{"line_number":335,"context_line":"            if match:"},{"line_number":336,"context_line":"                info \u003d match.group(1)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_bf478b77","line":333,"range":{"start_line":332,"start_character":30,"end_line":333,"end_character":66},"updated":"2019-07-30 12:52:16.000000000","message":"Don\u0027t we need \u0027r\u0027 prefix before the second string?\nAccording to my test below, the first and second strings are evaluated separately and then concatenated.\nI guess you use raw strings for regular expression but the second string is not a raw string in the current version.\n\n$ python2.7\nPython 2.7.15+ (default, Nov 27 2018, 23:36:35) \n[GCC 7.3.0] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e r\u0027\\a\u0027 r\u0027\\b\u0027 \u003d\u003d r\u0027\\a\\b\u0027\nTrue\n\u003e\u003e\u003e r\u0027\\a\u0027 \u0027\\b\u0027 \u003d\u003d r\u0027\\a\\b\u0027\nFalse\n\u003e\u003e\u003e \n\n$ python3  \nPython 3.6.8 (default, Jan 14 2019, 11:02:34) \n[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e r\u0027\\a\u0027 r\u0027\\b\u0027 \u003d\u003d r\u0027\\a\\b\u0027\nTrue\n\u003e\u003e\u003e r\u0027\\a\u0027 \u0027\\b\u0027 \u003d\u003d r\u0027\\a\\b\u0027\nFalse\n\u003e\u003e\u003e","commit_id":"517ca1d55aee225273b8f835d40fe053fa21dfaf"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"9edfea706daed171dcc7f7ec40ea309594d1693d","unresolved":false,"context_lines":[{"line_number":329,"context_line":"                             _(\u0027User password has been updated successfully.\u0027))"},{"line_number":330,"context_line":"        except Exception as exc:"},{"line_number":331,"context_line":"            response \u003d exceptions.handle(request, ignore\u003dTrue)"},{"line_number":332,"context_line":"            match \u003d re.match((r\u0027The password does not match the \u0027"},{"line_number":333,"context_line":"                              \u0027requirements:(.*?) [(]HTTP 400[)]\u0027), str(exc),"},{"line_number":334,"context_line":"                             re.UNICODE | re.MULTILINE)"},{"line_number":335,"context_line":"            if match:"},{"line_number":336,"context_line":"                info \u003d match.group(1)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_815370e2","line":333,"range":{"start_line":332,"start_character":30,"end_line":333,"end_character":66},"in_reply_to":"7faddb67_bf478b77","updated":"2019-08-13 11:44:57.000000000","message":"Well, we don\u0027t need r in any of them, since I removed all the backslashes anyways.","commit_id":"517ca1d55aee225273b8f835d40fe053fa21dfaf"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"f48589768e0d4c31d672047c9afa2a44b422f3eb","unresolved":false,"context_lines":[{"line_number":327,"context_line":"                    redirect\u003dFalse)"},{"line_number":328,"context_line":"            messages.success(request,"},{"line_number":329,"context_line":"                             _(\u0027User password has been updated successfully.\u0027))"},{"line_number":330,"context_line":"        except Exception as exc:"},{"line_number":331,"context_line":"            response \u003d exceptions.handle(request, ignore\u003dTrue)"},{"line_number":332,"context_line":"            match \u003d re.match((r\u0027The password does not match the \u0027"},{"line_number":333,"context_line":"                              r\u0027requirements:(.*?) [(]HTTP 400[)]\u0027), str(exc),"},{"line_number":334,"context_line":"                             re.UNICODE | re.MULTILINE)"},{"line_number":335,"context_line":"            if match:"},{"line_number":336,"context_line":"                info \u003d match.group(1)"},{"line_number":337,"context_line":"                messages.error(request, _(\u0027The password does not match the \u0027"},{"line_number":338,"context_line":"                                          \u0027requirements: %s\u0027) % info)"},{"line_number":339,"context_line":"            else:"},{"line_number":340,"context_line":"                messages.error(request,"},{"line_number":341,"context_line":"                               _(\u0027Unable to update the user password.\u0027))"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        if isinstance(response, http.HttpResponse):"},{"line_number":344,"context_line":"            return response"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_716566e0","line":341,"range":{"start_line":330,"start_character":8,"end_line":341,"end_character":72},"updated":"2019-08-21 06:36:37.000000000","message":"This will handle only a specific exception i.e. PasswordRequirementsValidationError.\nCan\u0027t we used below approach:\n\nexcept Exception as ex:\n    exceptions.handle(request, _(\u0027Unable to update \n                                 user password: %s\u0027) % ex)\nit will handle all exceptions and give user same message on UI as given by keystone.\nThoughts?","commit_id":"8f5a3cd7dad96a0a764e0b7bd295fca8878a5166"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"672e354f438e1199675b76a269b44c929ad90195","unresolved":false,"context_lines":[{"line_number":327,"context_line":"                    redirect\u003dFalse)"},{"line_number":328,"context_line":"            messages.success(request,"},{"line_number":329,"context_line":"                             _(\u0027User password has been updated successfully.\u0027))"},{"line_number":330,"context_line":"        except Exception as exc:"},{"line_number":331,"context_line":"            response \u003d exceptions.handle(request, ignore\u003dTrue)"},{"line_number":332,"context_line":"            match \u003d re.match((r\u0027The password does not match the \u0027"},{"line_number":333,"context_line":"                              r\u0027requirements:(.*?) [(]HTTP 400[)]\u0027), str(exc),"},{"line_number":334,"context_line":"                             re.UNICODE | re.MULTILINE)"},{"line_number":335,"context_line":"            if match:"},{"line_number":336,"context_line":"                info \u003d match.group(1)"},{"line_number":337,"context_line":"                messages.error(request, _(\u0027The password does not match the \u0027"},{"line_number":338,"context_line":"                                          \u0027requirements: %s\u0027) % info)"},{"line_number":339,"context_line":"            else:"},{"line_number":340,"context_line":"                messages.error(request,"},{"line_number":341,"context_line":"                               _(\u0027Unable to update the user password.\u0027))"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        if isinstance(response, http.HttpResponse):"},{"line_number":344,"context_line":"            return response"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_7c20ddb0","line":341,"range":{"start_line":330,"start_character":8,"end_line":341,"end_character":72},"in_reply_to":"7faddb67_716566e0","updated":"2019-08-21 08:14:48.000000000","message":"But then the error message is not translated.","commit_id":"8f5a3cd7dad96a0a764e0b7bd295fca8878a5166"},{"author":{"_account_id":29313,"name":"Vishal Manchanda","email":"manchandavishal143@gmail.com","username":"vishalmanchanda"},"change_message_id":"60626b8912a4b52bc39359c89e882ebac186719c","unresolved":false,"context_lines":[{"line_number":327,"context_line":"                    redirect\u003dFalse)"},{"line_number":328,"context_line":"            messages.success(request,"},{"line_number":329,"context_line":"                             _(\u0027User password has been updated successfully.\u0027))"},{"line_number":330,"context_line":"        except Exception as exc:"},{"line_number":331,"context_line":"            response \u003d exceptions.handle(request, ignore\u003dTrue)"},{"line_number":332,"context_line":"            match \u003d re.match((r\u0027The password does not match the \u0027"},{"line_number":333,"context_line":"                              r\u0027requirements:(.*?) [(]HTTP 400[)]\u0027), str(exc),"},{"line_number":334,"context_line":"                             re.UNICODE | re.MULTILINE)"},{"line_number":335,"context_line":"            if match:"},{"line_number":336,"context_line":"                info \u003d match.group(1)"},{"line_number":337,"context_line":"                messages.error(request, _(\u0027The password does not match the \u0027"},{"line_number":338,"context_line":"                                          \u0027requirements: %s\u0027) % info)"},{"line_number":339,"context_line":"            else:"},{"line_number":340,"context_line":"                messages.error(request,"},{"line_number":341,"context_line":"                               _(\u0027Unable to update the user password.\u0027))"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        if isinstance(response, http.HttpResponse):"},{"line_number":344,"context_line":"            return response"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_697fbade","line":341,"range":{"start_line":330,"start_character":8,"end_line":341,"end_character":72},"in_reply_to":"7faddb67_7c20ddb0","updated":"2019-08-21 09:52:31.000000000","message":"I think the issue applies to large number of exceptions than what is targeted for this patch i.e. showing less useful info in dashboard than what is actually returned from API.\nThis approach is right for fixing the issue mentioned but ultimately we need to do this for every exception.\nI\u0027m currently working on changing the hard-coded exceptions in horizon to the original msg returned from API.","commit_id":"8f5a3cd7dad96a0a764e0b7bd295fca8878a5166"}]}
