Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot input quotation marks or backslashes in mitmproxy console #3216

Closed
astiob opened this issue Jun 20, 2018 · 2 comments
Closed

Cannot input quotation marks or backslashes in mitmproxy console #3216

astiob opened this issue Jun 20, 2018 · 2 comments

Comments

@astiob
Copy link

astiob commented Jun 20, 2018

Steps to reproduce the problem:
  1. Launch mitmproxy.
  2. Open the command console by pressing : or f.
  3. Type: "foo" or "" or 'foo' or "" or \\ or \" or \'.

As soon as the second quotation mark is typed in, both quotation marks disappear. As soon as the character after the backslash is typed in, the preceding backslash disappears.

In particular, this makes it impossible to filter by values that contain quotation marks (as already noted in #1053) or backslashes: you either don’t have the desired characters in the filter, or you have only one quotation mark and it complains that Command error: No closing quotation, or you have a lone backslash and it complains that Command error: No escaped character.

Any other comments? What have you tried so far?

I’ve tried to quote the affected characters by doubling them, preceding them with backslashes or enclosing them in other quotation marks, but as you can see, none of this helps.

Setting the view filter from the command line works, but as soon as you try to edit it interactively afterwards, it gets broken in the same manner.

System information
Mitmproxy: 4.0.1 
Python:    3.6.5
OpenSSL:   OpenSSL 1.1.0h  27 Mar 2018
Platform:  Linux-4.4.114-42-default-x86_64-with-SuSE-42.3-x86_64

The same thing happened on mitmproxy 3.

@astiob astiob changed the title Cannot input quotation marks or multiple backslashes in mitmproxy console Cannot input quotation marks or backslashes in mitmproxy console Jun 20, 2018
@mhils
Copy link
Member

mhils commented Jun 22, 2018

Yes, this is super annoying right now. @kajojify's command work should actually fix this! 😃

@cortesi
Copy link
Member

cortesi commented Jun 23, 2018

Thanks for your report! The proximate issue here has been fixed in master via #3183. We still have work to do with string quotes and escaping - I've opened a separate issue for that at #3220.

@cortesi cortesi closed this as completed Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants