[KSambaShareData] Accept spaces in ACL host name
ClosedPublic

Authored by broulik on Aug 29 2018, 11:23 AM.

Details

Summary

Otherwise it would reject Unix User\foo

Test Plan

(or whatever the part before the backslash is called)

Thanks Fabian for help with regular expressions :)

  • I can now enable and disable guest mode again in kdenetwork-filesharing Share dialog and can actually access my shares now (somewhat)

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Aug 29 2018, 11:23 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 29 2018, 11:23 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
broulik requested review of this revision.Aug 29 2018, 11:23 AM
bruns added a subscriber: bruns.Aug 29 2018, 2:20 PM

Any chance you can create a unit test?

Any chance you can create a unit test?

Will try. Should it just check a couple of strings for validity? And also check that the ACL it read are valid since they must be as they came from net usershare?

Any chance you can create a unit test?

Will try. Should it just check a couple of strings for validity? And also check that the ACL it read are valid since they must be as they came from net usershare?

For the beginning, a couple of strings which previously failed, and some which are ok before and after, are a good start.

Some input which should be rejected would cover the majority of this functions scope.

broulik updated this revision to Diff 40705.Aug 30 2018, 1:17 PM
  • Add unit test
bruns added a comment.Aug 30 2018, 5:39 PM

+1

Sidenote: can you explain "(somewhat)" in the Test Plan?

dfaure requested changes to this revision.Aug 30 2018, 8:10 PM
dfaure added inline comments.
autotests/ksambasharetest.cpp
27

This includes all of QtTest *and* all of QtCore. Please use <QTest> instead.

autotests/ksambasharetest.h
22

typo: s/AH/HA/

This revision now requires changes to proceed.Aug 30 2018, 8:10 PM

Does this patch help with https://bugs.kde.org/show_bug.cgi?id=398079? It just came in today.

I don't know but without this patch I failed to configure permissions in the "Share" tab, e.g. "Allow guest" or "Everyone: full access", so maybe it fixes that.

broulik updated this revision to Diff 40730.Aug 31 2018, 7:15 AM
  • Fix include guard
  • Fix include
dfaure accepted this revision.Aug 31 2018, 8:14 AM
This revision is now accepted and ready to land.Aug 31 2018, 8:14 AM
This revision was automatically updated to reflect the committed changes.