Commit Graph

11 Commits (b52a8ba37a5e5e05b80beddff06b116371941d86)

Author SHA1 Message Date
Tobias Sauerwein 2c904c0974
Bump mypy to 0.930 (#62642)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-12-27 17:55:17 +01:00
Paulus Schoutsen 27e29b714c
Bump cloud to 0.47.1 (#55312)
* Bump cloud to 0.47.0

* Bump reqs

* Bump to 0.47.1

* Do not load hass_nabucasa during http startup

* fix some tests

* Fix test

Co-authored-by: Ludeeus <ludeeus@ludeeus.dev>
2021-09-01 09:54:54 -07:00
Paulus Schoutsen bab7d46c9b
Guard partial upgrade (#54617) 2021-08-15 19:56:56 -07:00
Paulus Schoutsen 38a7bdbcf3
Do not process forwarded for headers for cloud requests (#54364) 2021-08-10 01:45:56 +02:00
Joakim Plate d339e3bd8c
Reject trusted network access from proxies (#52388) 2021-07-02 11:49:42 +02:00
Joakim Plate eedf1c3ebe
Reject requests from the proxy itself (#52073)
* Reject requests from the proxy itself

* Adjust tests
2021-06-27 19:02:51 +02:00
Franck Nijhof 33e08f38da
Raise bad request when receiving HTTP request from untrusted proxy (#51839)
* Raise bad request when receiving HTTP request from untrusted proxy

* Fix code comment
2021-06-17 04:41:19 +02:00
Franck Nijhof cdd1f6b2f0
Always load middle to handle forwarded proxy data (#51332) 2021-06-01 09:38:55 -07:00
Ruslan Sayfutdinov ce15f28642
Add missing type hints in http component (#50411) 2021-05-10 14:30:47 -07:00
Ville Skyttä b4bac0f7a0
Exception chaining and wrapping improvements (#39320)
* Remove unnecessary exception re-wraps

* Preserve exception chains on re-raise

We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.

The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.

Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.

* Fix mistaken re-wrap in homematicip_cloud/hap.py

Missed the difference between HmipConnectionError and
HmipcConnectionError.

* Do not hide original error on plex new cert validation error

Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
2020-08-28 13:50:32 +02:00
Franck Nijhof cc4ebc925c
Improve X-Forwarded-* request headers handling (#38696)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-08-11 22:57:50 +02:00