web: don't crash when opening options (#6386)

This commit is contained in:
Maximilian Hils 2023-09-27 13:07:01 +02:00 committed by GitHub
parent c851a055c3
commit e6e354cf38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View file

@ -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

View file

@ -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 = (

View file

@ -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):