From 9fdf68d55965592117e972a8c7726bcaa64b8fd7 Mon Sep 17 00:00:00 2001 From: Ashesh Vashi Date: Tue, 28 May 2019 17:05:54 +0530 Subject: [PATCH] Fix fatal error on launch of pgAdmin4. Fixes #4298 --- web/pgadmin/misc/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/pgadmin/misc/__init__.py b/web/pgadmin/misc/__init__.py index 3c79d4d7d..0041e4a98 100644 --- a/web/pgadmin/misc/__init__.py +++ b/web/pgadmin/misc/__init__.py @@ -92,6 +92,7 @@ def index(): # A special URL used to "ping" the server ########################################################################## @blueprint.route("/ping") +@pgCSRFProtect.exempt def ping(): """Generate a "PING" response to indicate that the server is alive.""" return "PING" @@ -129,6 +130,7 @@ def explain_js(): # A special URL used to shut down the server ########################################################################## @blueprint.route("/shutdown", methods=('get', 'post')) +@pgCSRFProtect.exempt def shutdown(): if config.SERVER_MODE is not True: func = request.environ.get('werkzeug.server.shutdown')