airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject incubator-airflow git commit: [AIRFLOW-550] Make ssl config check empty string safe
Date Sun, 09 Oct 2016 07:35:23 GMT
Repository: incubator-airflow
Updated Branches:
  refs/heads/master a66cf75e2 -> 78ebd47e0


[AIRFLOW-550] Make ssl config check empty string safe

This config check on the ssl certificate makes it
safe for empty string. The empty string is provided
by default configuration settings and could cause
the webserver not starting up.

Closes #1824 from alexvanboxel/bugfix/airflow-550


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/78ebd47e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/78ebd47e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/78ebd47e

Branch: refs/heads/master
Commit: 78ebd47e0b3b69fba400580a1c75a34695c7fff6
Parents: a66cf75
Author: Alex Van Boxel <alex@vanboxel.be>
Authored: Sun Oct 9 09:34:42 2016 +0200
Committer: Bolke de Bruin <bolke@xs4all.nl>
Committed: Sun Oct 9 09:34:45 2016 +0200

----------------------------------------------------------------------
 airflow/bin/cli.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/78ebd47e/airflow/bin/cli.py
----------------------------------------------------------------------
diff --git a/airflow/bin/cli.py b/airflow/bin/cli.py
index 324f869..a821aad 100755
--- a/airflow/bin/cli.py
+++ b/airflow/bin/cli.py
@@ -695,10 +695,10 @@ def webserver(args):
                       conf.get('webserver', 'webserver_worker_timeout'))
     ssl_cert = args.ssl_cert or conf.get('webserver', 'web_server_ssl_cert')
     ssl_key = args.ssl_key or conf.get('webserver', 'web_server_ssl_key')
-    if ssl_cert is None and ssl_key is not None:
+    if not ssl_cert and ssl_key:
         raise AirflowException(
             'An SSL certificate must also be provided for use with ' + ssl_key)
-    if ssl_cert is not None and ssl_key is None:
+    if ssl_cert and not ssl_key:
         raise AirflowException(
             'An SSL key must also be provided for use with ' + ssl_cert)
 


Mime
View raw message