Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116708 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 69317 invoked from network); 21 Dec 2021 18:06:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Dec 2021 18:06:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3106B1804C3 for ; Tue, 21 Dec 2021 11:10:06 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS208722 5.45.192.0/18 X-Spam-Virus: No X-Envelope-From: Received: from forward500j.mail.yandex.net (forward500j.mail.yandex.net [5.45.198.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 21 Dec 2021 11:10:05 -0800 (PST) Received: from myt5-b88997415fa8.qloud-c.yandex.net (myt5-b88997415fa8.qloud-c.yandex.net [IPv6:2a02:6b8:c12:1fa2:0:640:b889:9741]) by forward500j.mail.yandex.net (Yandex) with ESMTP id 3545A6CB6624 for ; Tue, 21 Dec 2021 22:10:03 +0300 (MSK) Received: from myt6-9bdf92ffd111.qloud-c.yandex.net (myt6-9bdf92ffd111.qloud-c.yandex.net [2a02:6b8:c12:468a:0:640:9bdf:92ff]) by myt5-b88997415fa8.qloud-c.yandex.net (mxback/Yandex) with ESMTP id xEzbytkuvW-A2fanxsq; Tue, 21 Dec 2021 22:10:03 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=php.watch; s=mail; t=1640113803; bh=fhsub8szoJwVMtsX37g2jMFpvbY6g+s3uPU6pI7LBqs=; h=Subject:From:In-Reply-To:Date:References:Cc:To:Message-ID; b=WVOVkuGZCwcGzgOuS2eLZE0b8voX045nxYitQ3hhC8SkSQvhxDKFz8SSFUmb3Pby8 N0Xcjsk2ituOZu061yRyTJcbxBAwynnwmToDLSY+ELOim0py42wUdMeDKbc8V2Clqz wVbvygLgt2At8QdsSiFJEnVbslHNYAWb4Y06CzSc= Authentication-Results: myt5-b88997415fa8.qloud-c.yandex.net; dkim=pass header.i=@php.watch Received: by myt6-9bdf92ffd111.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id l1TSMo0BEA-A2P8EYVg; Tue, 21 Dec 2021 22:10:02 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) X-Yandex-Fwd: 2 Received: by mail-ot1-f43.google.com with SMTP id v22-20020a9d4e96000000b005799790cf0bso5359298otk.5 for ; Tue, 21 Dec 2021 11:10:02 -0800 (PST) X-Gm-Message-State: AOAM530zzZ59rUQy87XK2BhpDoiJO3jTWLi1tWDAE6P1l4kAtbMNf/Tw 9CRZq2+4+xi12hQAi6H4uYNVMKaMQN4SqYLCkck= X-Google-Smtp-Source: ABdhPJyTbvs+pIdf2D2/WEeKahdNL3EErkAYfTA6ZKCPmjzkLShtPKG/pt7cnqq72tCz97eRjTnkZWrHGlISRy591uE= X-Received: by 2002:a05:6830:618:: with SMTP id w24mr1635785oti.347.1640113801168; Tue, 21 Dec 2021 11:10:01 -0800 (PST) MIME-Version: 1.0 References: <5d2b1d8f-9b7a-558f-8750-cc97b3ad0589@gmx.de> In-Reply-To: <5d2b1d8f-9b7a-558f-8750-cc97b3ad0589@gmx.de> Date: Wed, 22 Dec 2021 00:39:35 +0530 X-Gmail-Original-Message-ID: Message-ID: To: "Christoph M. Becker" Cc: PHP internals , Jakub Zelenka Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] header() allows arbitrary status codes From: ayesh@php.watch (Ayesh Karunaratne) > > Hi all, > > a while ago it has been reported[1] that our header() function actually > allows arbitrary status codes, which may even overflow. Of course, that > makes no sense, since the status code is supposed to be a three digit > code. So this ticket has been followed up by a pull request[2], and > Jakub suggested to further restrict the status code to be in range 100 - > 599. > > Since this could break some pathological cases, I wanted to ask whether > anybody objects to this change for the master branch (i.e. PHP 8.2). > > [1] > [2] I think it is a useful improvement. Should we adjust to http_response_code to match this behavior?