From patchwork Tue Feb 7 21:47:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 725365 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vHycg2cW5z9ryb for ; Wed, 8 Feb 2017 08:47:47 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="IUTqHG0V"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3vHycg1Zf3zDqBy for ; Wed, 8 Feb 2017 08:47:47 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="IUTqHG0V"; dkim-atps=neutral X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Received: from relay1001.mymailcheap.com (relay1001.mymailcheap.com [176.31.80.71]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vHycb11z9zDqBN for ; Wed, 8 Feb 2017 08:47:43 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="IUTqHG0V"; dkim-atps=neutral Received: from filter1001.mymailcheap.com (filter1001.mymailcheap.com [158.69.67.251]) by relay1001.mymailcheap.com (Postfix) with ESMTPS id 404D11F067; Tue, 7 Feb 2017 22:47:40 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by filter1001.mymailcheap.com (Postfix) with ESMTP id 5D9F421CB4; Tue, 7 Feb 2017 21:47:49 +0000 (UTC) Authentication-Results: filter1001.mymailcheap.com; dkim=permerror reason="key not found" header.d=that.guru header.i=@that.guru header.b=IUTqHG0V; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at filter1001.mymailcheap.com Received: from filter1001.mymailcheap.com ([127.0.0.1]) by localhost (filter1001.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RXRo3tZyZUks; Tue, 7 Feb 2017 21:47:46 +0000 (UTC) Received: from one.mxroute.com (one-outgoing.mxroute.com [23.92.70.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter1001.mymailcheap.com (Postfix) with ESMTPS; Tue, 7 Feb 2017 21:47:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version :Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=M1D596map0wYTjS0NQevGF4nNNdLaLawCZkm111L0tk=; b=IUTqHG0VrmOSf5fZHpdU12rKr0 aLJcVbCvpQ8tvimXcIct9ihtm1lbKo0ljrce73Edes9u+QGNG47wRB/02nS0KsbnerXPxu2rJ/65Q XebXaGa2GaPVk7MPR2GF61vQjLp2KdIUAysmq9vo8y9pmKkoxo0qG8EOJaowcWxssGlzF6puoWJfV JEQnYt5cITNSe8m++urmenGQbb9MlYqX7oWTOXaJ0H0bzjxSyJWpPBQiuqY+s9ipJLhHfG/gy5G+Y KA2yuzqSAElgReTJ9eE/lyutvNy/EI9dlefUKZlgH11qvHMs4vWYvV/usRr021Hp5i+irw/nG1+Cb rNsCrCdA==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH] settings: Wildcard 'ALLOWED_HOSTS' settings Date: Tue, 7 Feb 2017 21:47:16 +0000 Message-Id: <20170207214716.30310-1-stephen@that.guru> X-Mailer: git-send-email 2.9.3 X-OutGoing-Spam-Status: No, score=-1.0 X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Django 1.10.3, 1.9.11 and 1.8.16 changed default behavior for ALLOWED_HOSTS to prevent DNS rebinding attacks [1]. Unfortunately this also means we can't access the development Docker or Vagrant installs by IP address. Sidestep the issue by wildcarding the 'ALLOWED_HOSTS' setting for development, thus allowing connections from any IP. [1] https://docs.djangoproject.com/en/1.10/ref/settings/#allowed-hosts Signed-off-by: Stephen Finucane Cc: Daniel Axtens Reviewed-by: Daniel Axtens --- patchwork/settings/dev.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/patchwork/settings/dev.py b/patchwork/settings/dev.py index a084d6a..ee5b203 100644 --- a/patchwork/settings/dev.py +++ b/patchwork/settings/dev.py @@ -18,6 +18,9 @@ from .base import * # noqa # https://docs.djangoproject.com/en/1.8/ref/settings/#core-settings # + +ALLOWED_HOSTS = ['*'] + SECRET_KEY = '00000000000000000000000000000000000000000000000000' # noqa DEBUG = True