From 8b7a638e9f69f06c21f4d119a585ba3a8bb1a8d0 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Thu, 25 Jul 2013 05:04:35 -0500 Subject: [PATCH] appadmin_manage_without_https, thanks Anthony --- VERSION | 2 +- applications/admin/controllers/appadmin.py | 3 ++- applications/examples/controllers/appadmin.py | 3 ++- applications/welcome/controllers/appadmin.py | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 40d80c03..b9239b7d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.07.23.11.07.29 +Version 2.6.0-development+timestamp.2013.07.25.05.03.42 diff --git a/applications/admin/controllers/appadmin.py b/applications/admin/controllers/appadmin.py index 32f515f0..2dc4a8de 100644 --- a/applications/admin/controllers/appadmin.py +++ b/applications/admin/controllers/appadmin.py @@ -32,7 +32,8 @@ except: if request.env.http_x_forwarded_for or request.is_https: session.secure() -elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1"): +elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1") and \ + (request.function != 'manage'): raise HTTP(200, T('appadmin is disabled because insecure channel')) if request.function == 'manage': diff --git a/applications/examples/controllers/appadmin.py b/applications/examples/controllers/appadmin.py index 32f515f0..2dc4a8de 100644 --- a/applications/examples/controllers/appadmin.py +++ b/applications/examples/controllers/appadmin.py @@ -32,7 +32,8 @@ except: if request.env.http_x_forwarded_for or request.is_https: session.secure() -elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1"): +elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1") and \ + (request.function != 'manage'): raise HTTP(200, T('appadmin is disabled because insecure channel')) if request.function == 'manage': diff --git a/applications/welcome/controllers/appadmin.py b/applications/welcome/controllers/appadmin.py index 32f515f0..2dc4a8de 100644 --- a/applications/welcome/controllers/appadmin.py +++ b/applications/welcome/controllers/appadmin.py @@ -32,7 +32,8 @@ except: if request.env.http_x_forwarded_for or request.is_https: session.secure() -elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1"): +elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1") and \ + (request.function != 'manage'): raise HTTP(200, T('appadmin is disabled because insecure channel')) if request.function == 'manage':