Editing set-cookie attributes crashes mitmproxy
See original GitHub issueSteps to reproduce the problem:
- Create a flow with response and edit its set-cookies
- Press enter on the Attributes column.
Traceback (most recent call last):
File "/mnt/c/Users/user/git/mitmproxy/mitmproxy/tools/console/master.py", line 216, in run
self.loop.run()
File "/home/user/venv/lib/python3.5/site-packages/urwid/main_loop.py", line 278, in run
self._run()
File "/home/user/venv/lib/python3.5/site-packages/urwid/main_loop.py", line 376, in _run
self.event_loop.run()
File "/home/user/venv/lib/python3.5/site-packages/urwid/main_loop.py", line 682, in run
self._loop()
File "/home/user/venv/lib/python3.5/site-packages/urwid/main_loop.py", line 719, in _loop
self._watch_files[fd]()
File "/home/user/venv/lib/python3.5/site-packages/urwid/raw_display.py", line 393, in <lambda>
event_loop, callback, self.get_available_raw_input())
File "/home/user/venv/lib/python3.5/site-packages/urwid/raw_display.py", line 493, in parse_input
callback(processed, processed_codes)
File "/home/user/venv/lib/python3.5/site-packages/urwid/main_loop.py", line 403, in _update
self.process_input(keys)
File "/home/user/venv/lib/python3.5/site-packages/urwid/main_loop.py", line 503, in process_input
k = self._topmost_widget.keypress(self.screen_size, k)
File "/mnt/c/Users/user/git/mitmproxy/mitmproxy/tools/console/window.py", line 303, in keypress
k
File "/mnt/c/Users/user/git/mitmproxy/mitmproxy/tools/console/keymap.py", line 130, in handle
return self.executor(b.command)
File "/mnt/c/Users/user/git/mitmproxy/mitmproxy/tools/console/commandexecutor.py", line 17, in __call__
ret = self.master.commands.call(cmd)
File "/mnt/c/Users/user/git/mitmproxy/mitmproxy/command.py", line 221, in call
return self.call_args(parts[0], parts[1:])
File "/mnt/c/Users/user/git/mitmproxy/mitmproxy/command.py", line 212, in call_args
return self.commands[path].call(args)
File "/mnt/c/Users/user/git/mitmproxy/mitmproxy/command.py", line 101, in call
ret = self.func(*pargs)
File "/mnt/c/Users/user/git/mitmproxy/mitmproxy/command.py", line 251, in wrapper
return function(*args, **kwargs)
File "/mnt/c/Users/user/git/mitmproxy/mitmproxy/tools/console/consoleaddons.py", line 174, in nav_select
self.master.inject_key("m_select")
File "/mnt/c/Users/user/git/mitmproxy/mitmproxy/tools/console/master.py", line 181, in inject_key
self.loop.process_input([key])
File "/home/user/venv/lib/python3.5/site-packages/urwid/main_loop.py", line 503, in process_input
k = self._topmost_widget.keypress(self.screen_size, k)
File "/mnt/c/Users/user/git/mitmproxy/mitmproxy/tools/console/window.py", line 299, in keypress
k = super().keypress(size, k)
File "/home/user/venv/lib/python3.5/site-packages/urwid/container.py", line 1128, in keypress
return self.body.keypress( (maxcol, remaining), key )
File "/home/user/venv/lib/python3.5/site-packages/urwid/container.py", line 2269, in keypress
key = w.keypress((mc,) + size[1:], key)
File "/mnt/c/Users/user/git/mitmproxy/mitmproxy/tools/console/window.py", line 36, in keypress
ret = super().keypress(size, key)
File "/home/user/venv/lib/python3.5/site-packages/urwid/container.py", line 1128, in keypress
return self.body.keypress( (maxcol, remaining), key )
File "/mnt/c/Users/user/git/mitmproxy/mitmproxy/tools/console/grideditor/base.py", line 356, in keypress
elif column.keypress(key, self) and not self.handle_key(key):
File "/mnt/c/Users/user/git/mitmproxy/mitmproxy/tools/console/grideditor/col_subgrid.py", line 30, in keypress
editor.master.view_grideditor(
AttributeError: 'ConsoleMaster' object has no attribute 'view_grideditor'
System information
Mitmproxy: 3.0.0.dev0002 (commit 299df48) Python: 3.5.2 OpenSSL: OpenSSL 1.1.0g 2 Nov 2017 Platform: Linux-4.4.0-43-Microsoft-x86_64-with-Ubuntu-16.04-xenial
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Cookie Security Attributes
Application penetration tests frequesntly identify problems with cookie attributes. Let's take a look at cookie flags and security.
Read more >Features - mitmproxy docs
Features. Anticache; Blocklist; Client-side replay; Map Local; Map Remote; Modify Body; Modify Headers; Proxy Authentication; Server-side ...
Read more >How to Enable Secure Cookies | Crashtest Security
Cookies that are not marked as secure can be transferred via an unencrypted connection. Learn here how to enable secure cookies.
Read more >Cookie parsing terminates at the first semicolon, ignoring quotes
Issue 700618: Cookie parsing terminates at the first semicolon, ignoring quotes · 1. Web server sends `Set-Cookie: foo="bar;baz";Version=1;Path=" ...
Read more >HTTP COOKIE WEAKNESSES, ATTACK METHODS AND ...
2.6.4 Session Protection – HTTP Cookie Attributes . ... any cookies in previous Set-Cookie headers, the cookies are contained in the.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kajojify no problem, you can work on it since you already solved half of the problem. 😃
Update While working on this issue, I found a new bug. If we edit any part of flow in grideditor and then decide to enter Help tab (or any other) by pressing
shift+?
, all our editings won’t be saved and will disappear. I’ll include the fix into my PR.