allow non-local file:// redirect to a M$-WebDav URL
ClosedPublic

Authored by mkoller on Sep 30 2018, 3:21 PM.

Details

Summary

In our mainly windows company environment, I often receive links in emails like this
file://some.server/DavWWWRoot/pwa/some/path/to/a/document

The files are served by a Sharepoint server, and M$ introduced the special "DavWWWRoot" prefix to notify
then WebDav shall be used.

See https://www.webdavsystem.com/server/access/windows

With this patch I can now nicely click such an URL and get the same as colleagues using win get

Test Plan

Using kioclient5 exec URL and clicking such an URL in kmail

Diff Detail

Repository
R241 KIO
Lint
Lint Skipped
Unit
Unit Tests Skipped
mkoller created this revision.Sep 30 2018, 3:21 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 30 2018, 3:21 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
mkoller requested review of this revision.Sep 30 2018, 3:21 PM
ngraham added a subscriber: ngraham.

Code change looks pretty sane to me. Can we change "M$" to "MS" or "Microsoft" though? It's not the most professional, and the symbolism is even rather dated; there are many many companies that have more money than Microsoft these days...

bruns added a subscriber: bruns.Sep 30 2018, 3:37 PM
bruns added inline comments.
file.cpp
338

Can you please replace the m$. Also, 'Windows' is likely more correct here, MS does even do Linux these days ...

344

Is this also working in all cases for SSL connections? webdavs might be required.

mkoller updated this revision to Diff 42626.Sep 30 2018, 8:56 PM

M$ -> windows

About SSL: I have no idea how an SSL url from a sharepoint server would look like, since it seems the setup we use does not use ssl.
The mentioned webdavsystem.com link just describes how it would look like as a win-UNC path, but since I receive urls in mail which are not in the unc syntax, I'm not sure if they will contain this @ssl token or not

dfaure accepted this revision.Oct 7 2018, 4:37 PM

+2, assuming the commit log doesn't have M$ anymore (the phab review does, but you don't use arc apparently so I guess the two things are unrelated)

This revision is now accepted and ready to land.Oct 7 2018, 4:37 PM
bruns added a comment.Oct 7 2018, 6:09 PM

There are a few things which would be good to test:

Try if the following URLs work (on windows):

  • file://some.server@80/DavWWWRoot/pwa/some/path/to/a/document
  • file://some.server:80/DavWWWRoot/pwa/some/path/to/a/document
  • file://some.server@SSL/DavWWWRoot/pwa/some/path/to/a/document

Check if SSL is enabled on the server:
$> telnet some.server 443
With dolphin:

  • webdavs://some.server/DavWWWRoot/pwa/some/path/to/a/document

At least one of "@80", ":80" should work on windows, as it just states the default explicitly.

file://some.server:80/DavWWWRoot/pwa/some/path/to/a/document clearly works since it's standard URL syntax.
file://some.server@80/DavWWWRoot/pwa/some/path/to/a/document does not, since it's not a valid URL syntax.

443 is not enabled, so I can't test it, but given the fact that
file://some.server@SSL/DavWWWRoot/pwa/some/path/to/a/document
is also not a valid URL syntax, I know it will not work.

And since https://www.webdavsystem.com/server/access/windows
only talks about UNC path syntax, I even have no clue if this weird syntax will ever end up that way in a file:// URL.

I have no idea how my colleagues did produce the file:// URL - for sure not manually.
I just see that I received mails with a file:// URL, not with a UNC syntax

This revision was automatically updated to reflect the committed changes.
bruns added a comment.EditedOct 7 2018, 9:24 PM

file://some.server:80/DavWWWRoot/pwa/some/path/to/a/document clearly works since it's standard URL syntax.
file://some.server@80/DavWWWRoot/pwa/some/path/to/a/document does not, since it's not a valid URL syntax.

443 is not enabled, so I can't test it, but given the fact that
file://some.server@SSL/DavWWWRoot/pwa/some/path/to/a/document
is also not a valid URL syntax, I know it will not work.

Oh, you "know"...

See the comment in https://www.roelvanlisdonk.nl/2010/05/21/how-to-create-a-windows-explorer-shortcut-on-the-desktop-to-a-sharepoint-document-library/

https://stackoverflow.com/questions/49805544/connect-to-a-site-via-ssl-davwwwroot-not-usual-url-why-does-this-make-a-differe

I was talking about the code I changed, which uses QUrl, which can not parse the @SSL syntax.
I tried.