diff --git a/CHANGELOG.md b/CHANGELOG.md index 865390d8e..007c5ddff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ * Fix certificate generation for punycode domains. ([#6382](https://github.com/mitmproxy/mitmproxy/pull/6382), @mhils) +* Fix a bug that would crash mitmweb when opening options. + ([#6386](https://github.com/mitmproxy/mitmproxy/pull/6386), @mhils) ## 24 September 2023: mitmproxy 10.1.0 diff --git a/mitmproxy/addonmanager.py b/mitmproxy/addonmanager.py index e0c5ef86a..d587b6bb3 100644 --- a/mitmproxy/addonmanager.py +++ b/mitmproxy/addonmanager.py @@ -82,6 +82,7 @@ class Loader: reflowed by tools. Information on the data type should be omitted - it will be generated and added by tools as needed. """ + assert not isinstance(choices, str) if name in self.master.options: existing = self.master.options._options[name] same_signature = ( diff --git a/mitmproxy/addons/savehar.py b/mitmproxy/addons/savehar.py index 8f80cd354..09ff6ce97 100644 --- a/mitmproxy/addons/savehar.py +++ b/mitmproxy/addons/savehar.py @@ -78,9 +78,11 @@ class SaveHar: "hardump", str, "", - "Save a HAR file with all flows on exit. " - "You may select particular flows by setting save_stream_filter.", - "For mitmdump, enabling this option will mean that flows are kept in memory. ", + """ + Save a HAR file with all flows on exit. + You may select particular flows by setting save_stream_filter. + For mitmdump, enabling this option will mean that flows are kept in memory. + """, ) def configure(self, updated):