Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 21E7C200B97 for ; Sun, 9 Oct 2016 09:35:29 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 20604160ADA; Sun, 9 Oct 2016 07:35:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5C6C6160AC3 for ; Sun, 9 Oct 2016 09:35:28 +0200 (CEST) Received: (qmail 80166 invoked by uid 500); 9 Oct 2016 07:35:27 -0000 Mailing-List: contact commits-help@airflow.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.incubator.apache.org Delivered-To: mailing list commits@airflow.incubator.apache.org Received: (qmail 80157 invoked by uid 99); 9 Oct 2016 07:35:27 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Oct 2016 07:35:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 22C0C1A043D for ; Sun, 9 Oct 2016 07:35:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id UC5IgalPNfTk for ; Sun, 9 Oct 2016 07:35:25 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 4A4935F471 for ; Sun, 9 Oct 2016 07:35:24 +0000 (UTC) Received: (qmail 80017 invoked by uid 99); 9 Oct 2016 07:35:23 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Oct 2016 07:35:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4E36EDFBA8; Sun, 9 Oct 2016 07:35:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bolke@apache.org To: commits@airflow.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-airflow git commit: [AIRFLOW-550] Make ssl config check empty string safe Date: Sun, 9 Oct 2016 07:35:23 +0000 (UTC) archived-at: Sun, 09 Oct 2016 07:35:29 -0000 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 Authored: Sun Oct 9 09:34:42 2016 +0200 Committer: Bolke de Bruin 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)