You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Eric Hall <su...@darkart.com> on 2013/08/16 23:10:26 UTC

svn 1.8.1 fails on underscore in the tunnel protocol

Hello-
	We have a custom tunnel protocol withrepository URLs of the form:

		svn+foo_bar://

	After upgrading from svn 1.7.x to 1.8.1, these URLs are considered
invalid, giving an error of:

		svn: E170000: Illegal repository URL

	This occurs on an 'svn up' or an 'svn checkout'.

	Changing the tunnel protocol name to 'foobar' (i.e. drop the underscore)
appears to work properly, both 'svn up' and 'svn checkout' work fine.

	Is this a bug, or should tunnel protocols not have underscores in them?



		-eric


Re: svn 1.8.1 fails on underscore in the tunnel protocol

Posted by Ben Reser <be...@reser.org>.
On 8/18/13 5:02 PM, Geoff Field wrote:
> Reading through that RFC, I note the following paragraph:
> 
> 2.3.  Unreserved Characters
> 
>    Characters that are allowed in a URI but do not have a reserved
>    purpose are called unreserved.  These include uppercase and lowercase
>    letters, decimal digits, hyphen, period, underscore, and tilde.
> 
>       unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"
> 
> To me, this quite clearly states that underscores ARE permitted in URLs.  Any code that fails to allow them is contrary to the RFC.

That section only applies to the path portion of the URI.

The relevant section is 3.1 which defines what can be in the scheme section:

   scheme      = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )

>> The related change was not in Subversion itself, but in 
>> apr-util 1.5.2.
>> [[
>>   *) apr_uri_parse(): Do not accept invalid characters in the scheme.
>>      Per RFC 3986 3.3, enforce that the first segment of a 
>> relative path does
>>      not contain a colon. PR 52479.
>> ]]
> 
> That's about a colon, not an underscore.

That's what he was fixing but he specifically started enforcing the RFC.
 I think the section 3.3 in his commit message is a typo.

He adds the following to limit the characters allowed in the scheme:
+#define T_SCHEME          0x10        /* '0' ... '9', '-', '+', '.'
+                                       * (allowed in scheme except
first char)
+                                       */

You can see the full change here:
http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/uri/apr_uri.c?r1=1460351&r2=1462434&pathrev=1462434

RE: svn 1.8.1 fails on underscore in the tunnel protocol

Posted by Geoff Field <Ge...@aapl.com.au>.
> From: Bert Huijben
> Sent: Saturday, 17 August 2013 9:18 AM
> > From: Branko Čibej
> > Sent: vrijdag 16 augustus 2013 23:29
> > On 16.08.2013 23:10, Eric Hall wrote:
> > > Hello-
> > > 	We have a custom tunnel protocol withrepository URLs of 
> the form:
> > >
> > > 		svn+foo_bar://
> > >
> > > 	After upgrading from svn 1.7.x to 1.8.1, these URLs are 
> considered 
> > > invalid, giving an error of:
> > >
> > > 		svn: E170000: Illegal repository URL
> > >
> > > 	This occurs on an 'svn up' or an 'svn checkout'.
> > >
> > > 	Changing the tunnel protocol name to 'foobar' (i.e. drop the
> > underscore)
> > > appears to work properly, both 'svn up' and 'svn 
> checkout' work fine.
> > >
> > > 	Is this a bug, or should tunnel protocols not have 
> underscores in
> > them?
> > 
> > See RFC 3986, section 3.1:
> > 
> > http://www.ietf.org/rfc/rfc3986.txt
> > 
> > Underscores are not allowed in the URL scheme. It would appear that 
> > allowing them was a bug in previous versions of Subversion.

Reading through that RFC, I note the following paragraph:

2.3.  Unreserved Characters

   Characters that are allowed in a URI but do not have a reserved
   purpose are called unreserved.  These include uppercase and lowercase
   letters, decimal digits, hyphen, period, underscore, and tilde.

      unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"

To me, this quite clearly states that underscores ARE permitted in URLs.  Any code that fails to allow them is contrary to the RFC.


> The related change was not in Subversion itself, but in 
> apr-util 1.5.2.
> [[
>   *) apr_uri_parse(): Do not accept invalid characters in the scheme.
>      Per RFC 3986 3.3, enforce that the first segment of a 
> relative path does
>      not contain a colon. PR 52479.
> ]]

That's about a colon, not an underscore.

Regards,

Geoff

-- 
Apologies for the auto-generated legal disclaimer.

- The contents of this email, and any attachments, are strictly private
and confidential.
- It may contain legally privileged or sensitive information and is intended
solely for the individual or entity to which it is addressed.
- Only the intended recipient may review, reproduce, retransmit, disclose,
disseminate or otherwise use or take action in reliance upon the information
contained in this email and any attachments, with the permission of
Australian Arrow Pty. Ltd.
- If you have received this communication in error, please reply to the sender
immediately and promptly delete the email and attachments, together with
any copies, from all computers.
- It is your responsibility to scan this communication and any attached files
for computer viruses and other defects and we recommend that it be
subjected to your virus checking procedures prior to use.
- Australian Arrow Pty. Ltd. does not accept liability for any loss or damage
of any nature, howsoever caused, which may result
directly or indirectly from this communication or any attached files. 



RE: svn 1.8.1 fails on underscore in the tunnel protocol

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Branko Čibej [mailto:brane@wandisco.com]
> Sent: vrijdag 16 augustus 2013 23:29
> To: users@subversion.apache.org
> Subject: Re: svn 1.8.1 fails on underscore in the tunnel protocol
> 
> On 16.08.2013 23:10, Eric Hall wrote:
> > Hello-
> > 	We have a custom tunnel protocol withrepository URLs of the form:
> >
> > 		svn+foo_bar://
> >
> > 	After upgrading from svn 1.7.x to 1.8.1, these URLs are considered
> > invalid, giving an error of:
> >
> > 		svn: E170000: Illegal repository URL
> >
> > 	This occurs on an 'svn up' or an 'svn checkout'.
> >
> > 	Changing the tunnel protocol name to 'foobar' (i.e. drop the
> underscore)
> > appears to work properly, both 'svn up' and 'svn checkout' work fine.
> >
> > 	Is this a bug, or should tunnel protocols not have underscores in
> them?
> 
> See RFC 3986, section 3.1:
> 
> http://www.ietf.org/rfc/rfc3986.txt
> 
> Underscores are not allowed in the URL scheme. It would appear that
> allowing them was a bug in previous versions of Subversion.

The related change was not in Subversion itself, but in apr-util 1.5.2.
[[
  *) apr_uri_parse(): Do not accept invalid characters in the scheme.
     Per RFC 3986 3.3, enforce that the first segment of a relative path does
     not contain a colon. PR 52479.
]]

	Bert


Re: svn 1.8.1 fails on underscore in the tunnel protocol

Posted by Branko Čibej <br...@wandisco.com>.
On 16.08.2013 23:10, Eric Hall wrote:
> Hello-
> 	We have a custom tunnel protocol withrepository URLs of the form:
>
> 		svn+foo_bar://
>
> 	After upgrading from svn 1.7.x to 1.8.1, these URLs are considered
> invalid, giving an error of:
>
> 		svn: E170000: Illegal repository URL
>
> 	This occurs on an 'svn up' or an 'svn checkout'.
>
> 	Changing the tunnel protocol name to 'foobar' (i.e. drop the underscore)
> appears to work properly, both 'svn up' and 'svn checkout' work fine.
>
> 	Is this a bug, or should tunnel protocols not have underscores in them?

See RFC 3986, section 3.1:

http://www.ietf.org/rfc/rfc3986.txt

Underscores are not allowed in the URL scheme. It would appear that
allowing them was a bug in previous versions of Subversion.

-- Brane


-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com