SMBC_parse_path doesn't seem to handle special characters

Volker Lendecke Volker.Lendecke at SerNet.DE
Sun Jan 24 04:16:34 MST 2010

On Sun, Jan 24, 2010 at 12:32:25AM -0600, Eduardo Kienetz wrote:
> Agreed, but the bottom line is that that's supported, because some developer
> had [good?] reasons to do so, and it doesn't work right :)

True. But then to cover that 100% we need a proper escaping
mechanism, something like quoted-printable or base64-encoded
utf8 (like LDAP does) that fits into the url scheme.

The reason I'm a bit reluctant to put in your patch directly
is the fact that I personally are always scared by
string-parsing. This code is already very hard to
understand for me.

> It doesn't really matter since at the end (smbc_opendir, etc) I'll still
> need to pass it in plaintext, besides it's a web-based application anyway.
> However I wouldn't recommend its use without encryption (SSL or in a VPN).
> What am I missing?

Nothing. I just tried to point out that there is an
alternative in libsmbclient without any quoting problems at

> P.S.: it looks like I'll have to create a
> "get_last_token_no_ltrim_talloc()", so that I can use at libsmb_path.c
> instead of next_token_no_ltrim_talloc(ctx, &p, &userinfo, "@"). That's to
> support parsing URLs with passwords containing @ (clarifying what I said in
> my first e-mail).

Hehe, that kindof supports my statement "string parsing is
scary", doesn't it? :-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <>

More information about the samba-technical mailing list