From dev-return-38742-archive-asf-public=cust-asf.ponee.io@subversion.apache.org Fri Dec 14 19:05:30 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id C633D180645 for ; Fri, 14 Dec 2018 19:05:29 +0100 (CET) Received: (qmail 34521 invoked by uid 500); 14 Dec 2018 18:05:28 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 34511 invoked by uid 99); 14 Dec 2018 18:05:28 -0000 Received: from mail-relay.apache.org (HELO mailrelay1-lw-us.apache.org) (207.244.88.152) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Dec 2018 18:05:28 +0000 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by mailrelay1-lw-us.apache.org (ASF Mail Server at mailrelay1-lw-us.apache.org) with ESMTPSA id B9C5E1007 for ; Fri, 14 Dec 2018 18:05:27 +0000 (UTC) Received: by mail-ed1-f53.google.com with SMTP id y56so5639620edd.11 for ; Fri, 14 Dec 2018 10:05:27 -0800 (PST) X-Gm-Message-State: AA+aEWbDbV1ClXSXd+GQDCIVR5+o4lrLVenu7KIpuYllqY+1suTXbxsq SENkxogjiDc9JquN/pWX3mJmWWbca4qLQpMUyjg= X-Google-Smtp-Source: AFSGD/UXu0IWgo9GjVkaP4Hj0yruEsxSLLZyiaFcNw0Hi5mf1XWc8aKL2GvwN5pAKP0tgQIVw4iYCQfxWRftS79KR6s= X-Received: by 2002:a50:c017:: with SMTP id r23mr4031767edb.278.1544810726853; Fri, 14 Dec 2018 10:05:26 -0800 (PST) MIME-Version: 1.0 References: <89de5509-04b7-2dc6-cfa4-7f55edf62282@apache.org> <1e53afe3-947a-a7a6-848c-1eae397fea68@gmail.com> <1544649829.433922.1607507080.5C9EC775@webmail.messagingengine.com> <1544713530.3935559.1608222856.3F4F26D0@webmail.messagingengine.com> <53e25894-e9ff-6b1b-def3-e9d0e348a868@collab.net> <6f32d532-f52e-5625-3efe-6ea284dd0525@apache.org> <1544800724.2286371.1609242384.37887FB2@webmail.messagingengine.com> <1544807645.3314990.1609244776.0E9C75A4@webmail.messagingengine.com> In-Reply-To: <1544807645.3314990.1609244776.0E9C75A4@webmail.messagingengine.com> Reply-To: brane@apache.org From: =?UTF-8?Q?Branko_=C4=8Cibej?= Date: Fri, 14 Dec 2018 19:05:13 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: New canonicalization functions [was: Subversion Exception!] To: dev@subversion.apache.org Content-Type: multipart/alternative; boundary="0000000000009e9cdc057cff4672" --0000000000009e9cdc057cff4672 Content-Type: text/plain; charset="UTF-8" On Fri, 14 Dec 2018, 18:14 Julian Foad Julian Foad wrote: > > Are you willing to add random-input testing for them? > > The attached patch 'dirent-uri-test-random-2.patch' tests rules like: > > * every result should pass an X_is_canonical() test (obvious by code > inspection); > * every other input should produce SVN_ERR_CANONICALIZATION_FAILED; > * when a path is "canonical", it should be unchanged by "canonicalize". > > Some findings: > > * svn_uri_canonicalize_safe("") aborts; > * svn_uri_canonicalize_safe("/foo") aborts; > We can fix this in the private "canonicalize()" function that all these eventually call. As before, I didn't have time to unknit the internal implementation. * upper/lower case inconsistencies in URIs > What inconsistencies? A canonical URI has the scheme and host name in lowercase, but the path, query, fragment and user info parts are case-sensitive. > I previously also found upper/lower case inconsistencies in dirent drive > letters, when running these tests with "#define SVN_USE_DOS_PATHS" set in > dirent_uri.c, but am right now failing to replicate that. > Similarly, I think we (or APR?) make drive letters lowercase. -- Brane --0000000000009e9cdc057cff4672 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, = 14 Dec 2018, 18:14 Julian Foad <julianfoad@apache.org wrote:
J= ulian Foad wrote:
> Are you willing to add random-input testing for them?

The attached patch 'dirent-uri-test-random-2.patch' tests rules lik= e:

=C2=A0 * every result should pass an X_is_canonical() test (obvious by code= inspection);
=C2=A0 * every other input should produce SVN_ERR_CANONICALIZATION_FAILED;<= br> =C2=A0 * when a path is "canonical", it should be unchanged by &q= uot;canonicalize".

Some findings:

=C2=A0 * svn_uri_canonicalize_safe("") aborts;
=C2=A0 * svn_uri_canonicalize_safe("/foo") aborts;


We can fix this in the private "canonicalize()" func= tion that all these eventually call. As before, I didn't have time to u= nknit the internal implementation.


=C2=A0 * upper/lower case inconsistencies in URIs



What inconsistencies? A canonical URI has the= scheme and host name in lowercase, but the path, query, fragment and user = info parts are case-sensitive.



I previously also found upper/lower case inconsistencies in dirent drive le= tters, when running these tests with "#define SVN_USE_DOS_PATHS" = set in dirent_uri.c, but am right now failing to replicate that.


<= div dir=3D"auto">Similarly, I think we (or APR?) make drive letters lowerca= se.


-- Brane
--0000000000009e9cdc057cff4672--