From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id D34C83857C45 for ; Thu, 16 Jul 2020 18:48:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D34C83857C45 Received: by mail-ej1-x635.google.com with SMTP id p20so7667362ejd.13 for ; Thu, 16 Jul 2020 11:48:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kHDDA2sUWUDhFjcpeDvMczedFwBruD6kfEbM9Tun7oI=; b=mxCGYKGARetbG8TF9g2x9YamgDthDHs8P1FfzObb7w9VwD/BoxFwAn93KwPOUvbexy p71FC37QbxyA7Cx3f7Hg0YX0SVc42RuKTCGDz1Idh9D1kBpPtnF0W+Ryu2/uXvVYu3uL CwvY3j9YUPu8aHx9jUlDW3V+/kqU2aW9TlPA19pO+kbObj3t7YpvCaC+dZG05FeMeDUg QOGtj3Y1I0pjpBOXqINCtjhkp+sbrki8E5jXrD3v/IGpcxQl9B9ueR3UEmIl7hzBCYUW 48iJUthYDqC0ydkD7Oga0ccnZ7QfRuSpX4sTNoCfciHxPp6VFdvpbAEytm1Lz46PJ0Z8 3ypw== X-Gm-Message-State: AOAM530/uWyWXGPjJ6/kgGfXfO/BxJmk0Jj75z6FmqBwGw2fiZd1kHwp 6MjgRmRGwWJspmf0JiWDjbcsng2N2Tc= X-Google-Smtp-Source: ABdhPJxfYtBf98kC1XNaEi5DTNPixic5d7QbSZipf0RqhHvR9AEKv4fpUfLKnbYPNMOL44c57VYoDg== X-Received: by 2002:a17:906:4dd4:: with SMTP id f20mr5391890ejw.170.1594925321630; Thu, 16 Jul 2020 11:48:41 -0700 (PDT) Received: from [192.168.2.121] (pd9ed5fcd.dip0.t-ipconnect.de. [217.237.95.205]) by smtp.gmail.com with ESMTPSA id j21sm6101298edq.20.2020.07.16.11.48.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Jul 2020 11:48:40 -0700 (PDT) Subject: Re: Cygwin package search and cygcheck -p urlencoding still broken on new web server To: The Cygwin Mailing List References: <9c03bed5-da26-512c-3c31-ed6cd59f8043@SystematicSw.ab.ca> From: Marco Atzeri Message-ID: Date: Thu, 16 Jul 2020 20:48:39 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: it Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 18:48:44 -0000 On 16.07.2020 15:42, Jon Turney wrote: > On 16/07/2020 08:44, Marco Atzeri via Cygwin wrote: >> On 16.07.2020 06:25, Brian Inglis wrote: >>> On 2020-07-15 14:13, Marco Atzeri via Cygwin wrote: >>>> Problem: I want to search for >>>>     libssh/libssh.h >>>> Using https://cygwin.com/packages/ >>>> If I put the name and press Go the URL is changed in >>>> https://cygwin.com/cgi-bin2/package-grep.cgi?grep=libssh%2Flibssh.h&arch=x86_64 >>>> >>>> and the output is >>>>     Found 0 matches for libsshx2Flibssh.h >>>>                               ^^^ >>>> Instead if I modify directly the URL in: >>>> https://cygwin.com/cgi-bin2/package-grep.cgi?grep=libssh/libssh.h&arch=x86_64 > > > I think that this is an invalid URL, that just happens to work, so it's > correct that the link we produce is urlencoded. > > (See e.g. https://en.wikipedia.org/wiki/Query_string#URL_encoding) > >>>> Found 3 matches for libssh/libssh.h >>>> .... >>>> I guess that the current incapability is due to spurious urlencode in >>>> cgi-bin2/package-grep.cgi >>>> that is modifing the $param_grep >>>> echo '
  • '$file' - >>>> '$desc'
  • ' >>>> Could someone double check my guess ? > > So it seems the urlencode is correct, but the urldecode isn't working. > > I've applied a one-character change which appears to fix things. > >> the git logs says that only Frank and Jon have recently worked on >> >>     cgi-bin2/package-grep.cgi >> >> I would like to double check any possible modification before proposing a >> patch to change the web server... > > This was actually fairly easy to reproduce locally, once I realized what > was going on: > > $ export url="libssh%2Flibssh.h" ; printf '%b' "${url//%/\x}" > libsshx2Flibssh.h > > $ export url="libssh%2Flibssh.h" ; printf '%b' "${ur//%/\\x}" > libssh/libssh.h Thanks Jon now the search works fine also with cygcheck -p