WebDAV plugin: not expected behavior of Updir [..] in root of server

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

WebDAV plugin: not expected behavior of Updir [..] in root of server

Post by *DrShark »

To reproduce the issue:
1. Share some files/dirs on one first phone with TC4A's WiFi-WLAN plugin.
2. On another phone, connect to same WiFi access point and create a new server with a name of first phone as a connection name and server with almost exact address data provided by WiFi Transfer plugin on the first phone, though you have to strip "http://" part from it when typing the "Server name/directory" in Edit Server dialog of WebDAV plugin.
3. Enter the server connection you added to WebDAV plugin, TC4A will open a path that will look like:
///WebDAV/<Phone name (connection name)>/<part of WiFi Plugin's URL after last slash>/

Total Commander for Android now should show the fil
4. Try to tap on updir (".." item in filelist):
TC4A will briefly show some progress dialog with the

///WebDAV/<Phone name (connection name)>/

path and an error with word "Forbidden".

Then the panel will be refreshed by TC4A, but the location won't change.
5. Tap the updir ("..") again:
TC4A will go to own Home folder.

Expected behavior: after a tap on .. TC4A either should open ///WebDAV/<Phone name (connection name)>/, even though TC currently treats that location as Forbidden, and show there the updir item (to jump to ///WebDAV/) and the <part of WiFi Plugin's URL after last slash>/ dir (to go back), or it should immediately jump upper to the ///WebDAV/ (but not to Home folder!), of course doing this on a first try of a tap on "..".
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: WebDAV plugin: not expected behavior of Updir [..] in root of server

Post by *ghisler(Author) »

This happens because the WiFi transfer plugin uses a 4 digit directory name as an access code. You are not allowed to go to the directrory above and will get a "forbidden" HTTP error.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: WebDAV plugin: not expected behavior of Updir [..] in root of server

Post by *DrShark »

ghisler(Author) wrote: 2021-08-18, 08:43 UTC This happens because the WiFi transfer plugin uses a 4 digit directory name as an access code. You are not allowed to go to the directrory above and will get a "forbidden" HTTP error.
Maybe you could allow access to that forbidden dir under a condition that TC4A will only show pesudo-file <forbidden>, the updir and the access-code dir there? This would make it possible to navigate between
///WevDAV/ - ////WevDAV/Connection name/ - ////WevDAV/Connection name/Access code/

Or could you at least make the jump to the ///WebDAV/ instead of Home folder after TC (or plugin) encounters this "forbidden" error after a tap on updir in the /Access code/ dir?
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: WebDAV plugin: not expected behavior of Updir [..] in root of server

Post by *ghisler(Author) »

I could try that, but I don't know how other clients would react then - there are predetermined HTTP errors to use here.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: WebDAV plugin: not expected behavior of Updir [..] in root of server

Post by *DrShark »

ghisler(Author) wrote: 2021-08-20, 13:30 UTC I could try that, but I don't know how other clients would react then - there are predetermined HTTP errors to use here.
OK, I don't know how it works in other WebDAV configurations, but the way TC/plugin treat this Forbidden error look strange to me:
After a tap on updir, TC briefly shows the dialog with a title Forbidden and the name of that forbidden dir user tried to enter, then refreshes current dir. A second time user taps the updir TC just jumps to Home folder.
I wonder whether other WebDAV users expect this kind of behavior... Or handling of such kind of "Forbidden" error very this way is described somewhere in WebDAV protocol standards?
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply