[jcifs] SMB URL
Allen, Michael B (RSCH)
Michael_B_Allen at ml.com
Wed Jul 10 09:31:37 EST 2002
If I do
f1 = new SmbFile( "smb://foo%2Ebar.what.snu.com" )
and I call toString() for display purposes in a status bar or something I might get:
smb://foo.bar.what.snu.com
But internally if I create a new object like:
f2 = new SmbFile( f1, "share" );
and print that I correctly get:
smb://foo.bar.what.snu.com/share
then I call getPath() and should get:
smb://foo%2Ebar.what.snu.com/share
So far so good. Seems conceptually easy enough. But if I had inadvertently used foo.bar.what.snu.com
to build my new SmbFile object or a user accedentally used new SmbFile( f1.toString(), "share" ) the
new url would represent a host foo with scope bar.what.snu.com which is not correct. There are surely
other pitfalls where this can occur. In general the escape is easily lost. It's not a robust technique.
> -----Original Message-----
> From: Christopher R. Hertel [SMTP:crh at ubiqx.mn.org]
> Sent: Tuesday, July 09, 2002 7:17 PM
> To: Allen, Michael B (RSCH)
> Cc: jcifs at samba.org
> Subject: Re: [jcifs] SMB URL
>
> On Tue, Jul 09, 2002 at 06:55:48PM -0400, Allen, Michael B (RSCH) wrote:
> :
> > > Okay, so I understand that bit of it. What I don't understand is how that
> > > pushes complexity out into the semantic resolution.
> > >
> > That's not what I said. You're pushing the complexity into the
> > *serialization routines*. The problem is that your escaping technique
> > is not robust to frequent reserialization. If you export an unescaped
> > server name it may not represent the target anymore. Implementors
> > would have to take great care not to export an unescaped URL
> > *ever*. This has nothing to do with specific fields
> > or how you parse the URL.
>
> Alright, I need more clue on what is being serialized and when. I am
> obviously without clue.
>
> Chris -)-----
>
> --
> Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
> jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
> ubiqx Team -- http://www.ubiqx.org/ -)----- crh at ubiqx.mn.org
> OnLineBook -- http://ubiqx.org/cifs/ -)----- crh at ubiqx.org
More information about the jcifs
mailing list