increased security in admin and appadmin
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.10.0-trunk+timestamp.2014.08.21.18.22.13
|
Version 2.10.0-trunk+timestamp.2014.08.25.16.35.41
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ try:
|
|||||||
except:
|
except:
|
||||||
hosts = (http_host, )
|
hosts = (http_host, )
|
||||||
|
|
||||||
if request.env.http_x_forwarded_for or request.is_https:
|
if request.is_https:
|
||||||
session.secure()
|
session.secure()
|
||||||
elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1") and \
|
elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1") and \
|
||||||
(request.function != 'manage'):
|
(request.function != 'manage'):
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ if request.env.web2py_runtime_gae:
|
|||||||
else:
|
else:
|
||||||
is_gae = False
|
is_gae = False
|
||||||
|
|
||||||
if request.env.http_x_forwarded_for or request.is_https:
|
if request.is_https:
|
||||||
session.secure()
|
session.secure()
|
||||||
elif not request.is_local and not DEMO_MODE:
|
elif not request.is_local and not DEMO_MODE:
|
||||||
raise HTTP(200, T('Admin is disabled because insecure channel'))
|
raise HTTP(200, T('Admin is disabled because insecure channel'))
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ try:
|
|||||||
except:
|
except:
|
||||||
hosts = (http_host, )
|
hosts = (http_host, )
|
||||||
|
|
||||||
if request.env.http_x_forwarded_for or request.is_https:
|
if request.is_https:
|
||||||
session.secure()
|
session.secure()
|
||||||
elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1") and \
|
elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1") and \
|
||||||
(request.function != 'manage'):
|
(request.function != 'manage'):
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ try:
|
|||||||
except:
|
except:
|
||||||
hosts = (http_host, )
|
hosts = (http_host, )
|
||||||
|
|
||||||
if request.env.http_x_forwarded_for or request.is_https:
|
if request.is_https:
|
||||||
session.secure()
|
session.secure()
|
||||||
elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1") and \
|
elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1") and \
|
||||||
(request.function != 'manage'):
|
(request.function != 'manage'):
|
||||||
|
|||||||
Reference in New Issue
Block a user