Commit graph

11 commits

Author SHA1 Message Date
hexa-
e73634e6c7 http: reimplement X-Forwarded-For parsing ()
This feature needs to be enabled through the `http.use_x_forwarded_for` option,
satisfying security concerns of spoofed remote addresses in untrusted network
environments.

The testsuite was enhanced to explicitly test the functionality of the
header.

Fixes .

Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
2016-11-12 16:14:39 -08:00
Paulus Schoutsen
1d100dcac9 Bugfix/frontend group urls ()
* Remove unnecessary sleeps

* Frontend: fix serving index when refreshing view page.
2016-11-02 21:15:23 -07:00
Fabian Affolter
be272ac64a Disable too-many-* ()
* Disable too-many-* and too-few-public-methods

* Remove globally disabled pylint warnings
2016-10-30 22:18:53 +01:00
Paulus Schoutsen
519d9f2fd0 async HTTP component ()
* Migrate WSGI to asyncio

* Rename wsgi -> http

* Python 3.4 compat

* Move linting to Python 3.4

* lint

* Lint

* Fix Python 3.4 mock_open + binary data

* Surpress logging aiohttp.access

* Spelling

* Sending files is a coroutine

* More callback annotations and naming fixes

* Fix ios
2016-10-23 23:48:01 -07:00
Fabian Affolter
3aa1b6a3f8 Fix PEP257 issues () 2016-10-20 19:10:12 +02:00
hexa-
154eacef6c Http: Change approved_ips from string to cidr validation () [BREAKING CHANGE]
* Change approved_ips from string to cidr validation

Relabel to trusted_networks, better reflecting its expected inputs,
everything that ipaddress.ip_networks recognizes as an ip network
is possible:
- 127.0.0.1      (single ipv4 addresses)
- 192.168.0.0/24 (ipv4 networks)
- ::1            (single ipv6 addresses)
- 2001:DB8::/48  (ipv6 networks)

* Add support for the X-Forwarded-For header
2016-10-09 08:13:30 -07:00
Daniel Høyer Iversen
11c07440fe Accept login from approved ips without password () 2016-09-18 10:20:19 -07:00
Paulus Schoutsen
f802d6bfa3 Update test packages () 2016-08-21 11:44:40 -07:00
Robbie Trencheny
7882ce1afd Add CORS fixes to support OPTIONS preflight requests. ()
* Add CORS fixes to support OPTIONS preflight requests.

* Add CORS tests

* Fix formatting
2016-08-13 11:49:44 -07:00
Paulus Schoutsen
d1f4901d53 Migrate to cherrypy wsgi from eventlet () 2016-06-30 09:02:12 -07:00
Paulus Schoutsen
415cfc2537 WSGI: Hide password in logs ()
* WSGI: Hide password in logs

* Add auth + pw in logs tests
2016-05-24 23:19:37 -07:00