Skip to content

Commit

Permalink
[AIRFLOW-550] Make ssl config check empty string safe
Browse files Browse the repository at this point in the history
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 apache#1824 from alexvanboxel/bugfix/airflow-550
  • Loading branch information
alexvanboxel authored and bolkedebruin committed Oct 9, 2016
1 parent a66cf75 commit 78ebd47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/bin/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 78ebd47

Please sign in to comment.