Unexpected password remembering in archives with encrypted filenames

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Elwin_Ransom
Junior Member
Junior Member
Posts: 38
Joined: 2022-07-31, 18:14 UTC
Location: Perelandra

Unexpected password remembering in archives with encrypted filenames

Post by *Elwin_Ransom »

I'm not sure how to classify my message: bug report or enhancement request. Let's look at it together and decide if it's worth the effort. I apologize in advance for the time taken.

Given: test archive packed with "Encrypt file names" option. We want to explore the contents of the archive. Go inside the archive, a window opens asking for the password. Enter the password, the checkbox "Remember password" is unchecked. Go inside the archive, go back to the parent folder. After a short pause, go back inside the archive. The password is not asked again. TC remembered the password in spite of the fact that the checkbox "Remember" was unchecked.

Expected behavior
If we selected the "Encrypt file names" option, it means that we don't want the content of the archive to be explored without a password. Consequently, the file manager must prompt for a password every time someone tries to browse the archive. This is exactly how file managers 7-zip and WinRAR (for example) work.

Unexpected behavior of TC
The password is requested only when we first try to explore the archive. At further attempts to explore the same archive, the password is not requested, although the "Remember" checkbox is unchecked. The described behavior does not refer to unpacking operations, but only to exploring.

Test platform: Windows 7 x64, Total Commander 10.50 fresh install (no plugins, no additional settings)
Test archive 1: packed in WinRAR 6.11 x64 with "Encrypt file names" option, password: test1.
Test archive 2: packed in 7-zip 22.01 x64 with "Encrypt file names" option, password: test2.

Attaching the test files (direct link)
https://0x0.st/oeKV.zip

Please watch the video where I reproduce this issue
https://vimple.co/34d8089b3f694542820df915f7a5c3f4
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3854
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Re: Unexpected password remembering in archives with encrypted filenames

Post by *sqa_wizard »

You may change this (comfortable) behaviour.
Help wrote: KeepPackerPassword=0 Used together with option "RememberLastPassword". Allows you to keep last archive password when:
1: The program is minimized
2: The screen saver starts
3: both

RememberLastPassword=0 Set to 1 to remember the last used archive password for all other archives (packing+unpacking) until TC is closed, minimized or Windows goes to sleep
Add according entries to [Packer] section ofyour wincmd.ini and you are done.
#5767 Personal license
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Unexpected password remembering in archives with encrypted filenames

Post by *petermad »

2Elwin_Ransom
I can confirm that in your test1.rar archive the password for entering the archive is remembered even if "Remember (until program is closed or minimized" is not selected, but the password for opening the files is NOT remembered.

For your test2.7z archive the password for both entering the archive and opening the files is always remembered even when "Save password" is NOT selected.

The password dialog for rar files is a TC dialog, whereas the password dialog for 7z files does not appear to be a TC dialog, and it is always in English despite that my 7zip is setup to run in Danish.

2sqa_wizard
AlwaysRequestAgain is for FTP connections, not for archives AFAIK.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Unexpected password remembering in archives with encrypted filenames

Post by *Horst.Epp »

2petermad
According to my help file
KeepPackerPassword=0
should work and its not for ftp connections.
Unfortunately it doesn't work.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Unexpected password remembering in archives with encrypted filenames

Post by *petermad »

Horst.Epp wrote: 2022-08-01, 07:09 UTC 2petermad
According to my help file
KeepPackerPassword=0
should work and its not for ftp connections.
Unfortunately it doesn't work.
Help wrote:KeepPackerPassword=0 Used together with option "RememberLastPassword". Allows you to keep last archive password when:
1: The program is minimized
2: The screen saver starts
3: both
KeepPackerPassword is for overriding that the password should not be remembered after TC has been minimized and/or the screensaver has been active. Setting KeepPackerPassword only has effect if RememberLastPassword=1.


KeepPackerPassword does work as described for zip files, but NOT for rar and 7z files
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Unexpected password remembering in archives with encrypted filenames

Post by *ghisler(Author) »

Go inside the archive, a window opens asking for the password. Enter the password, the checkbox "Remember password" is unchecked. Go inside the archive, go back to the parent folder. After a short pause, go back inside the archive. The password is not asked again. TC remembered the password in spite of the fact that the checkbox "Remember" was unchecked.
No, it does not remember the password - it only remembers the file list of the last opened archive (separately per side). If you enter a different archive and then again this password protected archive, TC will again ask for the password. Or if you try to actually unpack or view a file, TC will also ask for the password.
Author of Total Commander
https://www.ghisler.com
User avatar
Elwin_Ransom
Junior Member
Junior Member
Posts: 38
Joined: 2022-07-31, 18:14 UTC
Location: Perelandra

Re: Unexpected password remembering in archives with encrypted filenames

Post by *Elwin_Ransom »

2ghisler(Author)
Thank you for your response.
it only remembers the file list of the last opened archive
Thank you, I understand that. But doesn't that contradict the "Encrypt File Names" archive option? Is it possible to make TC to respect the "Encrypt File Names" archive option?

2petermad
Thank you for your help. I'm glad my post is understood correctly.

2sqa_wizard
Thank you for your participation. If I understand correctly, the "RememberLastPassword" key depends directly on the "Remember" checkbox in the password request window. When we change the state of the checkbox, the value of the key automatically changes. Take a look at the video, please:
https://streamja.com/92oEy
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Unexpected password remembering in archives with encrypted filenames

Post by *ghisler(Author) »

Thank you, I understand that. But doesn't that contradict the "Encrypt File Names" archive option? Is it possible to make TC to respect the "Encrypt File Names" archive option?
Unfortunately Total Commander would become unusable if I did this, it would ask for the password each time you change directory within an archive.
Author of Total Commander
https://www.ghisler.com
User avatar
Elwin_Ransom
Junior Member
Junior Member
Posts: 38
Joined: 2022-07-31, 18:14 UTC
Location: Perelandra

Re: Unexpected password remembering in archives with encrypted filenames

Post by *Elwin_Ransom »

2ghisler(Author)
Got it, thank you for your responsiveness!
Post Reply