D27804: smb: add hack to support spaces in workgroup names

Harald Sitter noreply at phabricator.kde.org
Wed Mar 4 13:40:34 GMT 2020


sitter updated this revision to Diff 76934.
sitter added a comment.


  extend test coverage to % character in wg and umlaut in wg.
  I've also changed the construction in browse.cpp to use QUrlQuery so it does not trip over potential hash or question marks in the workgroup
  
  libsmbc is actually incredibly lenient in parsing the input urls, so you can more or less throw anything unencoded at it and it'll work.
  that is why the original `sambaUrl.toString(PrettyDecoded)` call works despite also not carying much for encoding.
  
  @thiago I am not sure I understood points 3 and 4 but I think they aren't really applicable:
  
  3. libsmbc doesn't give out urls so there is no need to convert the other way around
  4. slash, backslash, colon may not be part of netbios names and by extension the url parsing always works regardless of encoding as the host field cannot be ambigious with a trailing slash (which we always have)
  
  All that said, perhaps it'd make sense to change everything to QUrl::FullyEncoded to be on the safe side for the future? smbc does know how to deal with complete percent encoding from what I can tell

REPOSITORY
  R320 KIO Extras

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D27804?vs=76847&id=76934

BRANCH
  smb-smburl-static-autotest-ipv6-spaces

REVISION DETAIL
  https://phabricator.kde.org/D27804

AFFECTED FILES
  smb/autotests/smburltest.cpp
  smb/kio_smb_browse.cpp
  smb/smburl.cpp

To: sitter, ngraham
Cc: kde-frameworks-devel, kfm-devel, thiago, pberestov, iasensio, fprice, LeGast00n, cblack, MrPepe, fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200304/46700e8d/attachment.htm>


More information about the kfm-devel mailing list