From b2ab35e990b26dafdc9ddb0e5cbe67a1532bcb79 Mon Sep 17 00:00:00 2001 From: Dave Page Date: Sun, 26 Mar 2017 21:52:31 -0400 Subject: [PATCH] Don't require an auth key for the static help files. It doesn't play nicely with webkit. --- web/pgadmin/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/pgadmin/__init__.py b/web/pgadmin/__init__.py index 1054bde01..257b04ed2 100644 --- a/web/pgadmin/__init__.py +++ b/web/pgadmin/__init__.py @@ -462,10 +462,14 @@ def create_app(app_name=None): @app.before_request def before_request(): """Login the default user if running in desktop mode""" + + # Check the auth key is valid, if it's set, and we're not in server + # mode, and it's not a help file request. if not config.SERVER_MODE and app.PGADMIN_KEY != '': if ( (not 'key' in request.args or request.args['key'] != app.PGADMIN_KEY) and - request.cookies.get('PGADMIN_KEY') != app.PGADMIN_KEY + request.cookies.get('PGADMIN_KEY') != app.PGADMIN_KEY and + request.endpoint != 'help.static' ): abort(401)