13 Commits

Author SHA1 Message Date
Thomas Waldmann
bc9776b119 no exceptions when context processor saves the session, fixes #356 2018-10-01 15:06:01 +02:00
Jonne Haß
5e637b14c9 Handle IPv4-mapped IPv6 addresses
Some reverse proxy configurations pass REMOTE_ADDR
as a IPv4-mapped IPv6 address when listening on a
IPv6 socket. This patch converts such a mapped
address into a IPv4 address at all usages of
REMOTE_ADDR. It handles both, the ::ffff:192.0.2.128
format as well as the deprecated ::192.0.2.128 format.
2014-09-29 06:21:24 +02:00
Thomas Waldmann
d47793b71c s/WE_HAVE_SSL/WE_HAVE_TLS/g
SSL is the old/outdated name. Since 1999, it's called TLS.

Changed the name of the configuration setting.
2014-05-30 01:18:50 +02:00
Thomas Waldmann
0df4efce1c add/fix some module-level docstrings 2013-12-15 17:09:22 +01:00
Thomas Waldmann
76d3dfebc2 catch case where .session_key was None, leading to an invalid /detectip/None url 2013-11-15 01:16:13 +01:00
Thomas Waldmann
f6fb8b67bd try to not write into session unless there is really a change or a refresh needed, reduce code duplication
move code from HomeView to context processor
2013-11-14 02:11:44 +01:00
Thomas Waldmann
3b9b2698ed warn if cookies are limited to the secure site, but user is using the insecure site 2013-11-03 10:55:49 +01:00
Thomas Waldmann
7a99935597 use json serializer for sessions, change timestamps' data type, more security docs
json serializer can't serialize datetime (but integers), but is more safe than the pickle serializer.
2013-11-03 09:52:11 +01:00
Thomas Waldmann
ebb7a6e1ee new setting WE_HAVE_SSL to indicate whether the site also has https (not just http)
we will offer using the https site if we have ssl, otherwise we will just warn about insecure http usage.
2013-11-03 05:24:54 +01:00
Thomas Waldmann
2b0e70e59f remove help view, move project info to docs, make about view use settings
help: there was only a link to the rtd documentation (now directly linked from a "Documentation" navbar entry)
and some duplicate router configuration that was also shown (even with the correct values) when adding a host.

the help page html was not valid due to the values inserted into the router configuration help.

help/documentation policy: add static help to the docs, add dynamic help directly at the places (in the views) where needed
2013-11-03 00:02:02 +01:00
Thomas Waldmann
7cbacedaf1 stale ip handling: use logger, initialize timestamp in session if it is not there 2013-11-01 04:14:06 +01:00
Thomas Waldmann
2529263a48 remove stale IPs from session, so we don't show outdated information
could happen if there once was a IPv6 connection, but now is not any more.
it now kills infos older than 3 minutes from the session.

it also shows the age of the infos now on the hosts overview view (but not on home view due to cosmetic reasons).

optimization: only request the fake images for ipv4/v6 detection if we don't have a fresh IP already.

added example settings for using detectip on (ip6-)localhost
2013-11-01 04:03:34 +01:00
Bastian Blank
d2eab62ac4 Move all stuff into own top-level package 2013-10-17 23:59:07 +02:00