From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763116AbbA3THo (ORCPT ); Fri, 30 Jan 2015 14:07:44 -0500 Received: from pb-smtp1.int.icgroup.com ([208.72.237.35]:53918 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1760549AbbA3THm (ORCPT ); Fri, 30 Jan 2015 14:07:42 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=HTGSrvjW61fH4FRp4Dww4VNWGaNJE6NH yoeLO3NoIbJeDXpup7R7bXz0ygczLLcH6e0NOER40rJ8eF2ucK8dFvPY7YHS/IhA MZshIpGfuHHojMuwTv9cA8EjzUlLl7LJFifge+PMx2V9hNvd5MGNThoOx9gL/s6o MVzbcAA0OLs= From: Junio C Hamano To: Jeff King Cc: Git Mailing List , Josh Boyer , "Linux-Kernel\@Vger. Kernel. Org" , twaugh@redhat.com, Linus Torvalds Subject: Re: [PATCH 2/1] apply: reject input that touches outside $cwd References: <20150130182456.GA29477@peff.net> Date: Fri, 30 Jan 2015 11:07:34 -0800 In-Reply-To: <20150130182456.GA29477@peff.net> (Jeff King's message of "Fri, 30 Jan 2015 13:24:56 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 402B5232-A8B3-11E4-8C8C-7BA29F42C9D4-77302942!pb-smtp1.pobox.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jeff King writes: > It looks like your new --allow-uplevel goes to verify_path(). So this > isn't just about "..", but it will also protect against applying a patch > inside ".git". Which seems like a good thing to me, but I wonder if the > option name is a little misleading. True; not just misleading but is incorrect, I would say. Suggestions? > I agree they are orthogonal in concept, though I doubt the symlink tests > here would pass without the previous one... It won't; "do not apply across symlinks" is unconditional, and the new codepath introduced by this patch, which is conditional to the user option, shouldn't have to worry about them.