WebDav authentication prompt

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Abmea
Junior Member
Junior Member
Posts: 19
Joined: 2013-10-02, 15:45 UTC

WebDav authentication prompt

Post by *Abmea »

Hi,

In a previous thread (http://www.ghisler.ch/board/viewtopic.php?t=36923&highlight=webdav&sid=73d6b873728a46cb72ab4b0e94842af2), it was mentioned that the WebDav plugin should prompt for UserName/PW if none is provided in the configuration.

Is this something that is still on the roadmap?
Abmea
Junior Member
Junior Member
Posts: 19
Joined: 2013-10-02, 15:45 UTC

Post by *Abmea »

Hi,

The release notes of the latest WebDav plugin version mentioned that this was added. Apparently, it only prompts for a PW if none is configured. It will however not prompt for a User Name.

It would be great if the WebDav plugin worked like the FTP function and thus prompted for both UN and PW.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The problem is that WebDAV uses HTTP or HTTPS, and there is no indication whether user name or password is wrong, or both.
Author of Total Commander
https://www.ghisler.com
Abmea
Junior Member
Junior Member
Posts: 19
Joined: 2013-10-02, 15:45 UTC

Post by *Abmea »

Ok. Thanks for the reply.
I have found a workaround it in the meanwhile.
Abmea
Junior Member
Junior Member
Posts: 19
Joined: 2013-10-02, 15:45 UTC

Post by *Abmea »

For those interested in the workaround:

My goal is to have WebDav behave like TC FTP without a configured UN/PW and thus have it prompt me for both.

To do this, I have TC call a script from a button-bar button. The first argument is "?" and the second argument is "user name". As a result, TC prompts for input for what seems like the user name.

The result of the input is the argument to my script. In the script, I write tcwebdav.ini config. The config is allways the same, with the exception of the username. The PW remains empty.

The script then calls TC.exe again (same instance) with the desired WebDav URL "\\\\WebDAV\<ConnectionName>" as the target for the right panel.
TC WebDav opens the URL and prompts for the PW.

This is virtually identical to opening an FTP connection that has no UN/PW configured and for which TC prompts for the UN/PW.

The difference is that the user name remains in the webdav config, but I'll wipe that via some other way.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Does WebDav reread username from INI every time it opens a connection? It may simply read it once and then keep in memory.

BTW you can use tools for changing INI parameter instead of rewriting it, also there are tiny tools that ask TC to change path (I believe such tools work faster because there is no need to load large executable into memory). For example, you can use TCFS2 in order to write INI parameter and then change TC path, also you can use AskParam to prompt for username and then pass it to TCFS2 so it may work w/o scripts, just from buttonbar button.
Abmea
Junior Member
Junior Member
Posts: 19
Joined: 2013-10-02, 15:45 UTC

Post by *Abmea »

Yes, WebDAV will reread the ini file. Tested it and it works fine.

Thanks for the suggestions on the tools, I'll look into them.
Post Reply