rikkimax / alphaPhobos

Assume License: Boost
11 stars 1 forks source link

uri: URLs are not validated #7

Closed dhasenan closed 8 years ago

dhasenan commented 8 years ago

URIAddress("smb://@/%:")

I rather feel that that should throw an exception.

Even if it really shouldn't, accessing the username and password certainly should.

rikkimax commented 8 years ago

This is how I interpret it: smb://[user]@[hostname]/%:

This is valid. In the case of user and hostname, it will just return null.

dhasenan commented 8 years ago

RFC 1738 says that the ':@' portion is optional as a whole, not piece by piece. An empty username and password can be explicitly passed, then, as in "smb://:@hostname/path".

"%:" is an invalid percent-encoded value.

rikkimax commented 8 years ago

I don't do encoding. So not my problem :)