From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id C117D1F463; Thu, 2 Jan 2020 09:36:35 +0000 (UTC) Date: Thu, 2 Jan 2020 09:36:35 +0000 From: Eric Wong To: meta@public-inbox.org Subject: Re: [PATCH 2/3] solver: extract_diff: deal with missing "diff --git" line Message-ID: <20200102093635.GA11425@dcvr> References: <20200102092459.17612-1-e@80x24.org> <20200102092459.17612-3-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200102092459.17612-3-e@80x24.org> List-Id: Eric Wong wrote: > -my %bad_component = map { $_ => 1 } ('', '.', '..'); > + # get rid of path-traversal attempts and junk patches: > + # it's junk at best, an attack attempt at worse: > + state %bad_component = map { $_ => 1 } ('', '.', '..'); Nope, that fails on Perl 5.24.1. "Initialization of state variables in list context currently forbidden" :< Otherwise, "state" is a nice 5.10.x feature.