Ticket #4541 (closed enhancement: fixed)

Opened 7 months ago

Last modified 7 months ago

Hide VFS password in progress dialog

Reported by: zaytsev Owned by: andrew_b
Priority: minor Milestone: 4.8.32
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

https://github.com/MidnightCommander/mc/pull/198

Hello and sorry for submitting the PR here, just like the previous PR here, the Trac email is not arriving, I would much rather submit it there as an issue.

The problem is that it shows VFS (e.g. SFTP) passwords during ops that display VFS source (e.g. copy) in the progress dialog. The proposed change makes the source field identical to the one in target (i.e. it also includes CWD now), but this way it does not flash the password.

I see that 4.8.32 should be coming very soon, so I was hoping to get this squeezed in time for the release.

Thank you!

Change History

comment:1 Changed 7 months ago by zaytsev

From 416f0c7db008151844f70161fc415bbb14a77c96 Mon Sep 17 00:00:00 2001
From: crabique <6256096+crabique@users.noreply.github.com>
Date: Sat, 18 May 2024 21:29:15 +0300
Subject: [PATCH] (file_progress_show_source): hide vfs password

Signed-off-by: crabique <6256096+crabique@users.noreply.github.com>
---
 src/filemanager/filegui.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/filemanager/filegui.c b/src/filemanager/filegui.c
index caa481e468..b65d4a0dca 100644
--- a/src/filemanager/filegui.c
+++ b/src/filemanager/filegui.c
@@ -1142,12 +1142,8 @@ file_progress_show_source (file_op_context_t * ctx, const vfs_path_t * vpath)
 
     if (vpath != NULL)
     {
-        char *s;
-
-        s = vfs_path_tokens_get (vpath, -1, 1);
         label_set_text (ui->src_file_label, _("Source"));
-        label_set_text (ui->src_file, truncFileString (ui->op_dlg, s));
-        g_free (s);
+        label_set_text (ui->src_file, truncFileStringSecure (ui->op_dlg, vfs_path_as_str (vpath)));
     }
     else
     {

comment:2 Changed 7 months ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Component changed from mc-vfs to mc-core
  • Branch state changed from no branch to on review
  • Milestone changed from Future Releases to 4.8.32

Branch: 4541_hide_vfs_password
Initial changeset:93a74f9a14aab9919debeab9cd6f396f162f64be

comment:3 Changed 7 months ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:4 Changed 7 months ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

Merged to master: [cb97cd263b6b513ed19ecf3ec048833784e239b5].

git log --oneline 57cf824a5..cb97cd263

comment:5 Changed 7 months ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.