Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 708442 - net-proxy/mitmproxy-5.1.1: version bump
Summary: net-proxy/mitmproxy-5.1.1: version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PullRequest
Depends on: 718770 718796
Blocks: 718458
  Show dependency tree
 
Reported: 2020-02-06 01:28 UTC by Anton Bolshakov
Modified: 2020-09-03 07:49 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Bolshakov 2020-02-06 01:28:28 UTC
27 December 2019: mitmproxy 5.0.1

    * Fixed precompiled Linux binaries to not crash in table mode
    * Display webp images in mitmweb (@cixtor)

16 December 2019: mitmproxy 5.0

  ** Major Changes **
    * Added new Table UI (@Jessonsotoventura)
    * Added EKU extension to certificates. This fixes support for macOS Catalina (@vin01)

  ** Security Fixes **
    * Fixed command injection vulnerabilities when exporting flows as curl/httpie commands (@cript0nauta)
    * Do not echo unsanitized user input in HTTP error responses (@fimad)

  ** Full Changelog **
    * Moved to Github CI for Continuous Integration, dropping support for old Linux and macOS releases. (#3728)
    * Vastly improved command parsing, in particular for setting flow filters (@typoon)
    * Added a new flow export for raw responses (@mckeimic)
    * URLs are now edited in an external editor (@Jessonsotoventura)
    * mitmproxy now has a command history (@typoon)
    * Added terminal like keyboard shortcuts for the command bar (ctrl+w, ctrl+a, ctrl+f, ...) (@typoon)
    * Fixed issue with improper handling of non-ascii characters in URLs (@rjt-gupta)
    * Filtering can now use unicode characters (@rjt-gupta)
    * Fixed issue with user keybindings not being able to override default keybindings
    * Improved installation instructions
    * Added support for IPV6-only environments (@sethb157)
    * Fixed bug with server replay (@rjt-gupta)
    * Fixed issue with duplicate error responses (@ccssrryy)
    * Users can now set a specific external editor using $MITMPROXY_EDITOR (@rjt-gupta)
    * Config file can now be called `config.yml` or `config.yaml` (@ylmrx)
    * Fixed crash on `view.focus.[next|prev]` (@ylmrx)
    * Updated documentation to help using mitmproxy certificate on Android (@jannst)
    * Added support to parse IPv6 entries from `pfctl` on MacOS. (@tomlabaude)
    * Fixed instructions on how to build the documentation (@jannst)
    * Added a new `--allow-hosts` option (@pierlon)
    * Added support for zstd content-encoding (@tsaaristo)
    * Fixed issue where the replay server would corrupt the Date header (@tonyb486)
    * Improve speed for WebSocket interception (@MathieuBordere)
    * Fixed issue with parsing JPEG files. (@lusceu)
    * Improve example code style (@BoboTiG)
    * Fixed issue converting void responses to HAR (@worldmind)
    * Color coded http status codes in mitmweb (@arun-94)
    * Added organization to generated certificates (@Abcdefghijklmnopqrstuvwxyzxyz)
    * Errors are now displayed on sys.stderr (@JessicaFavin)
    * Fixed issue with replay timestamps (@rjt-gupta)
    * Fixed copying in mitmweb on macOS (@XZzYassin)

Thanks
Comment 1 Alex Barker 2020-04-20 23:04:14 UTC
I am probably going to need this if I ever get back to work, so I may take it over in the next couple of days.
Comment 2 Anton Bolshakov 2020-04-20 23:54:29 UTC
(In reply to Alex Barker from comment #1)
> I am probably going to need this if I ever get back to work, so I may take
> it over in the next couple of days.

ZC just pushed a WIP ebuild into Pentoo overlay, FYI:
https://github.com/pentoo/pentoo-overlay/commit/ee6a57cce020bc677c8cba18e198f3d927e128f7
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-04-21 18:07:10 UTC
Currently last-rited. Working on saving this...
Comment 4 Adrian Bassett 2020-04-22 16:50:44 UTC
(In reply to Sam James (sec padawan) from comment #3)
> Currently last-rited. Working on saving this...

Please to read this, thanks!
Comment 5 Alex Barker 2020-04-25 09:17:25 UTC
Just saw that you started work.  I got a build working prior to seeing this but if you want to take it over I am good with that.  There were a number of dependency updates and tweaks but it seems to be working with python 3.{6,7,8}.

PR: https://github.com/gentoo/gentoo/pull/15512
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-04-26 22:53:41 UTC
(In reply to Alex Barker from comment #5)
> Just saw that you started work.  I got a build working prior to seeing this
> but if you want to take it over I am good with that.  There were a number of
> dependency updates and tweaks but it seems to be working with python
> 3.{6,7,8}.
> 
> PR: https://github.com/gentoo/gentoo/pull/15512

No problem. I am happy for you to take it over.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-05-11 18:28:29 UTC
Please let us know if you are still working on this. Some QA problems need fixing in the PR.
Comment 8 nanikata15 2020-05-15 01:05:02 UTC
Since this was a showstopper for me, I’ve went ahead and emerged mitmproxy 5.1.1 from the PR [1], by dropping python 3.8 from the ebuild and adding python 3.7 to dev-python/kaitaistruct-0.8 as suggested. Everything else was already in portage. While seeming to work at first glance, one of my scripts crashed with an error:
 File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/server.py", line 121, in handle
    root_layer()
  File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/modes/http_proxy.py", line 9, in __call__
    layer()
  File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/tls.py", line 285, in __call__
    layer()
  File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/http1.py", line 83, in __call__
    layer()
  File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/http.py", line 190, in __call__
    if not self._process_flow(flow):
  File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/http.py", line 262, in _process_flow
    return self.handle_regular_connect(f)
  File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/http.py", line 208, in handle_regular_connect
    layer()
  File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/tls.py", line 278, in __call__
    self._establish_tls_with_client_and_server()
  File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/tls.py", line 358, in _establish_tls_with_client_and_server
    self._establish_tls_with_server()
  File "/usr/lib/python3.7/site-packages/mitmproxy/proxy/protocol/tls.py", line 448, in _establish_tls_with_server
    **args
  File "/usr/lib/python3.7/site-packages/mitmproxy/connections.py", line 292, in establish_tls
    self.convert_to_tls(cert=client_cert, sni=sni, **kwargs)
  File "/usr/lib/python3.7/site-packages/mitmproxy/net/tcp.py", line 386, in convert_to_tls
    **sslctx_kwargs
  File "/usr/lib/python3.7/site-packages/mitmproxy/net/tls.py", line 285, in create_client_context
    param = SSL._lib.SSL_CTX_get0_param(context._context)
AttributeError: module 'lib' has no attribute 'SSL_CTX_get0_param'

I’ve found something similar on the internet, and it was suggested to update dev-python/cryptography [2]. Indeed, mitmproxy-5.1.1 seems to have a requirement for dev-python/cryptography-2.9 [3]. My scripts have been working OK since I’ve updated to dev-python/cryptography-2.9.

[1] https://github.com/gentoo/gentoo/pull/15512
[2] https://stackoverflow.com/questions/61391682/mitmproxy-5-1-1-always-crashed
[3] https://github.com/mitmproxy/mitmproxy/commit/c1f01cc67c2adca177cd57b40169bf9dd771ac0b
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-05-20 18:15:37 UTC
Alex, are you still there? If not, I will take over and fix this to save it.
Comment 10 Alex Barker 2020-05-21 22:51:59 UTC
All of the issues should be resolved in the PR.
Comment 11 Larry the Git Cow gentoo-dev 2020-06-04 07:56:12 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=450414ec5c12be4b58c6487d4e679381c7905c99

commit 450414ec5c12be4b58c6487d4e679381c7905c99
Author:     Alexander Barker <alex@1stleg.com>
AuthorDate: 2020-06-04 07:52:52 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-06-04 07:56:04 +0000

    net-proxy/mitmproxy: Version Bump to 5.1.1
    
    Closes: https://bugs.gentoo.org/708442
    Bug: https://bugs.gentoo.org/718458
    
    Signed-off-by: Alex Barker <alex@1stleg.com>
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 net-proxy/mitmproxy/Manifest               |  1 +
 net-proxy/mitmproxy/mitmproxy-5.1.1.ebuild | 95 ++++++++++++++++++++++++++++++
 2 files changed, 96 insertions(+)
Comment 12 Adrian Bassett 2020-06-20 11:55:49 UTC
(In reply to Larry the Git Cow from comment #11)
> The bug has been closed via the following commit(s):
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=450414ec5c12be4b58c6487d4e679381c7905c99
> 
> commit 450414ec5c12be4b58c6487d4e679381c7905c99
> Author:     Alexander Barker <alex@1stleg.com>
> AuthorDate: 2020-06-04 07:52:52 +0000
> Commit:     Joonas Niilola <juippis@gentoo.org>
> CommitDate: 2020-06-04 07:56:04 +0000
> 
>     net-proxy/mitmproxy: Version Bump to 5.1.1
>     
>     Closes: https://bugs.gentoo.org/708442
>     Bug: https://bugs.gentoo.org/718458
>     
>     Signed-off-by: Alex Barker <alex@1stleg.com>
>     Signed-off-by: Joonas Niilola <juippis@gentoo.org>
> 
>  net-proxy/mitmproxy/Manifest               |  1 +
>  net-proxy/mitmproxy/mitmproxy-5.1.1.ebuild | 95
> ++++++++++++++++++++++++++++++
>  2 files changed, 96 insertions(+)

I see that this package has now been removed, despite the bump to 5.1.1 seemingly that addressed the python version issues.  Was this oversight?
Comment 13 Adrian Bassett 2020-06-20 12:10:12 UTC
(In reply to Larry the Git Cow from comment #11)
> The bug has been closed via the following commit(s):
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=450414ec5c12be4b58c6487d4e679381c7905c99
> 
> commit 450414ec5c12be4b58c6487d4e679381c7905c99
> Author:     Alexander Barker <alex@1stleg.com>
> AuthorDate: 2020-06-04 07:52:52 +0000
> Commit:     Joonas Niilola <juippis@gentoo.org>
> CommitDate: 2020-06-04 07:56:04 +0000
> 
>     net-proxy/mitmproxy: Version Bump to 5.1.1
>     
>     Closes: https://bugs.gentoo.org/708442
>     Bug: https://bugs.gentoo.org/718458
>     
>     Signed-off-by: Alex Barker <alex@1stleg.com>
>     Signed-off-by: Joonas Niilola <juippis@gentoo.org>
> 
>  net-proxy/mitmproxy/Manifest               |  1 +
>  net-proxy/mitmproxy/mitmproxy-5.1.1.ebuild | 95
> ++++++++++++++++++++++++++++++
>  2 files changed, 96 insertions(+)

I see that this package has now been removed, despite the bump to 5.1.1 that seemingly addressed the python version issues.  Was this oversight?
Comment 14 Adrian Bassett 2020-06-20 13:00:23 UTC
(In reply to Adrian Bassett from comment #13)
> (In reply to Larry the Git Cow from comment #11)
> > The bug has been closed via the following commit(s):
> > 
> > https://gitweb.gentoo.org/repo/gentoo.git/commit/
> > ?id=450414ec5c12be4b58c6487d4e679381c7905c99
> > 
> > commit 450414ec5c12be4b58c6487d4e679381c7905c99
> > Author:     Alexander Barker <alex@1stleg.com>
> > AuthorDate: 2020-06-04 07:52:52 +0000
> > Commit:     Joonas Niilola <juippis@gentoo.org>
> > CommitDate: 2020-06-04 07:56:04 +0000
> > 
> >     net-proxy/mitmproxy: Version Bump to 5.1.1
> >     
> >     Closes: https://bugs.gentoo.org/708442
> >     Bug: https://bugs.gentoo.org/718458
> >     
> >     Signed-off-by: Alex Barker <alex@1stleg.com>
> >     Signed-off-by: Joonas Niilola <juippis@gentoo.org>
> > 
> >  net-proxy/mitmproxy/Manifest               |  1 +
> >  net-proxy/mitmproxy/mitmproxy-5.1.1.ebuild | 95
> > ++++++++++++++++++++++++++++++
> >  2 files changed, 96 insertions(+)
> 
> I see that this package has now been removed, despite the bump to 5.1.1 that
> seemingly addressed the python version issues.  Was this oversight?

This has now been addressed, cf. https://bugs.gentoo.org/718458#c5