[GH-ISSUE #2990] 命令行启动,连接不带-nw参数会代入错误的密码 - win11 #1968

Closed
opened 2026-02-27 00:05:32 +03:00 by kerem · 11 comments
Owner

Originally created by @trexhuang on GitHub (Sep 19, 2023).
Original GitHub issue: https://github.com/electerm/electerm/issues/2990

Electerm Version and download file extension(Electerm版本和下载文件后缀)

1.32.38

Platform detail (平台详情)

WIN11

What steps will reproduce the bug?(重新问题的详细步骤)

(powershell) 如果命令连接不带-nw 参数,看debug资讯发现系统会代入错密码(-pw后的参数)而导致分页没有成功开启

执行的命令:

electerm.exe -l testuser -pw testpassword 192.168.2.20
Debug 资讯看到实际带的密码为'--allow-file-access-from-files'
14:27:16 debug › command line opts {
host: '192.168.2.20',
port: 22,
password: '--allow-file-access-from-files',
type: 'remote',
status: 'processing',
id: 'Fv_Xr9S',
encode: 'utf-8',
envLang: 'en_US.UTF-8',
enableSsh: true,
authType: 'password',
pane: 'terminal',
term: 'xterm-256color'
}

What should have happened?(期望的结果)

应该要能在没有 -nw参数的状况下正确的带入命令行-pw参数给的密码

Would this happen in other terminal app(是否能够在其他同类软件重现这个问题)

No response

Additional information(其他任何相关信息)

No response

Originally created by @trexhuang on GitHub (Sep 19, 2023). Original GitHub issue: https://github.com/electerm/electerm/issues/2990 ### Electerm Version and download file extension(Electerm版本和下载文件后缀) 1.32.38 ### Platform detail (平台详情) WIN11 ### What steps will reproduce the bug?(重新问题的详细步骤) (powershell) 如果命令连接不带-nw 参数,看debug资讯发现系统会代入错密码(-pw后的参数)而导致分页没有成功开启 执行的命令: > electerm.exe -l testuser -pw testpassword 192.168.2.20 Debug 资讯看到实际带的密码为'--allow-file-access-from-files' 14:27:16 debug › command line opts { host: '192.168.2.20', port: 22, **password: '--allow-file-access-from-files',** type: 'remote', status: 'processing', id: 'Fv_Xr9S', encode: 'utf-8', envLang: 'en_US.UTF-8', enableSsh: true, authType: 'password', pane: 'terminal', term: 'xterm-256color' } ### What should have happened?(期望的结果) 应该要能在没有 -nw参数的状况下正确的带入命令行-pw参数给的密码 ### Would this happen in other terminal app(是否能够在其他同类软件重现这个问题) _No response_ ### Additional information(其他任何相关信息) _No response_
kerem 2026-02-27 00:05:32 +03:00
Author
Owner

@zxdong262 commented on GitHub (Sep 19, 2023):

请问是下载的那个包呢?

<!-- gh-comment-id:1724944478 --> @zxdong262 commented on GitHub (Sep 19, 2023): 请问是下载的那个包呢?
Author
Owner

@trexhuang commented on GitHub (Sep 19, 2023):

electerm-1.32.38-win-x64-installer.exe

<!-- gh-comment-id:1726055372 --> @trexhuang commented on GitHub (Sep 19, 2023): electerm-1.32.38-win-x64-installer.exe
Author
Owner

@zxdong262 commented on GitHub (Sep 19, 2023):

没能复现这个问题,会不会是把 -l(小写L) 打成 -I (大写i)导致的?

<!-- gh-comment-id:1726690312 --> @zxdong262 commented on GitHub (Sep 19, 2023): 没能复现这个问题,会不会是把 `-l`(小写L) 打成 `-I` (大写i)导致的?
Author
Owner

@trexhuang commented on GitHub (Sep 20, 2023):

多次确认,没有打错参数
补充说明:於窗口已开启后执行命令才会发生此问题,如果窗口未开启则指令会打开程序窗口,此时会是正常的
附上debug里面options 和 argv擷取變化
执行命令: .\electerm.exe -l testuser -pw testpw 192.168.2.20
1.窗口不存在时执行命令:
options: { user: 'testuser', password: 'testpw' },
argv: [ '192.168.2.20' ],

17:39:39 debug › command line opts {
host: '192.168.2.20',
username: 'testuser',
port: 22,
password: 'testpw',
type: 'remote',
status: 'processing',
id: 'z0pLqR4',
encode: 'utf-8',
envLang: 'en_US.UTF-8',
enableSsh: true,
authType: 'password',
pane: 'terminal',
term: 'xterm-256color'
}

2.窗口存在时执行命令:
options: { password: '--allow-file-access-from-files' },
argv: [: 'en_US.UTF-8',
'C:\Users\trexh\AppData\Local\Programs\electerm\electerm.exe',
'-l',e: 'password',
'-pw',erminal',
'--allow-file-access-from-files',
'testuser',
'testpw',g › ws: connected to terminal -> ghjXaFK
'192.168.2.20'stom crypto binding not available
]

17:34:03 debug › command line opts {
host: '192.168.2.20',
port: 22,
password: '--allow-file-access-from-files',
type: 'remote',
status: 'processing',
id: 'BuZSSRl',
encode: 'utf-8',
envLang: 'en_US.UTF-8',
enableSsh: true,
authType: 'password',
pane: 'terminal',
term: 'xterm-256color'
}
看起来撷取指令乱掉了

<!-- gh-comment-id:1727360401 --> @trexhuang commented on GitHub (Sep 20, 2023): 多次确认,没有打错参数 补充说明:於窗口已开启后执行命令才会发生此问题,如果窗口未开启则指令会打开程序窗口,此时会是正常的 附上debug里面options 和 argv擷取變化 执行命令: .\electerm.exe -l testuser -pw testpw 192.168.2.20 1.窗口不存在时执行命令: options: { user: 'testuser', password: 'testpw' }, argv: [ '192.168.2.20' ], 17:39:39 debug › command line opts { host: '192.168.2.20', username: 'testuser', port: 22, password: 'testpw', type: 'remote', status: 'processing', id: 'z0pLqR4', encode: 'utf-8', envLang: 'en_US.UTF-8', enableSsh: true, authType: 'password', pane: 'terminal', term: 'xterm-256color' } 2.窗口存在时执行命令: options: { password: '--allow-file-access-from-files' }, argv: [: 'en_US.UTF-8', 'C:\Users\trexh\AppData\Local\Programs\electerm\electerm.exe', '-l',e: 'password', '-pw',erminal', '--allow-file-access-from-files', 'testuser', 'testpw',g › ws: connected to terminal -> ghjXaFK '192.168.2.20'stom crypto binding not available ] 17:34:03 debug › command line opts { host: '192.168.2.20', port: 22, password: '--allow-file-access-from-files', type: 'remote', status: 'processing', id: 'BuZSSRl', encode: 'utf-8', envLang: 'en_US.UTF-8', enableSsh: true, authType: 'password', pane: 'terminal', term: 'xterm-256color' } 看起来撷取指令乱掉了
Author
Owner

@zxdong262 commented on GitHub (Sep 21, 2023):

感谢反馈,将在下个版本修复

<!-- gh-comment-id:1728586436 --> @zxdong262 commented on GitHub (Sep 21, 2023): 感谢反馈,将在下个版本修复
Author
Owner

@trexhuang commented on GitHub (May 14, 2024):

这个功能似乎又坏了,情境相同,没带-nw就无法透过命令行启动程序,命令卡在10:18:22 debug ??electerm start,也没有后续

e.g
1.窗口存在时执行命令:FAIL
.\electerm.exe -l testuser -pw testpw 192.168.2.20
2.OK
.\electerm.exe -l testuser -pw testpw 192.168.2.20 -nw

<!-- gh-comment-id:2109153101 --> @trexhuang commented on GitHub (May 14, 2024): 这个功能似乎又坏了,情境相同,没带-nw就无法透过命令行启动程序,命令卡在10:18:22 debug ??electerm start,也没有后续 e.g 1.窗口存在时执行命令:FAIL .\electerm.exe -l testuser -pw testpw 192.168.2.20 2.OK .\electerm.exe -l testuser -pw testpw 192.168.2.20 -nw
Author
Owner

@trexhuang commented on GitHub (May 14, 2024):

我有测试了下其他提供的指令,有带参数的似乎只有-nw 和 -V -h是正常的,其他大部分都会呈现以下的状况:

C:\Users\trexh\AppData\Local\Programs\electerm>.\electerm.exe -bo "test.sh"

C:\Users\trexh\AppData\Local\Programs\electerm>
11:42:16 debug ??electerm start

C:\Users\trexh\AppData\Local\Programs\electerm>.\electerm.exe -sp 30976

C:\Users\trexh\AppData\Local\Programs\electerm>
11:42:32 debug ??electerm start

补充下安装包为:electerm-1.39.5-win-x64-installer.exe

先谢谢了

<!-- gh-comment-id:2109225082 --> @trexhuang commented on GitHub (May 14, 2024): 我有测试了下其他提供的指令,有带参数的似乎只有-nw 和 -V -h是正常的,其他大部分都会呈现以下的状况: C:\Users\trexh\AppData\Local\Programs\electerm>.\electerm.exe -bo "test.sh" C:\Users\trexh\AppData\Local\Programs\electerm> 11:42:16 debug ??electerm start C:\Users\trexh\AppData\Local\Programs\electerm>.\electerm.exe -sp 30976 C:\Users\trexh\AppData\Local\Programs\electerm> 11:42:32 debug ??electerm start 补充下安装包为:electerm-1.39.5-win-x64-installer.exe 先谢谢了
Author
Owner

@zxdong262 commented on GitHub (May 14, 2024):

感谢反馈,将在下个版本修复

<!-- gh-comment-id:2109227274 --> @zxdong262 commented on GitHub (May 14, 2024): 感谢反馈,将在下个版本修复
Author
Owner

@zxdong262 commented on GitHub (May 14, 2024):

我试了1.39.5没有复现这个问题,请问你用的哪个版本?

<!-- gh-comment-id:2109311221 --> @zxdong262 commented on GitHub (May 14, 2024): 我试了1.39.5没有复现这个问题,请问你用的哪个版本?
Author
Owner

@trexhuang commented on GitHub (May 14, 2024):

安装包是: electerm-1.39.5-win-x64-installer.exe

我录了视频给您参考,分别内容为1.39.5执行操作与于1.36.1(electerm-1.36.1-win-x64-installer.exe)
执行操作的过程

或是有其他调试log与设定我可以协助提供
谢谢

https://github.com/electerm/electerm/assets/50020959/2c8a8fe0-63bf-4a4d-8d17-e1e92c5a9cdd

<!-- gh-comment-id:2109410849 --> @trexhuang commented on GitHub (May 14, 2024): 安装包是: electerm-1.39.5-win-x64-installer.exe 我录了视频给您参考,分别内容为1.39.5执行操作与于1.36.1(electerm-1.36.1-win-x64-installer.exe) 执行操作的过程 或是有其他调试log与设定我可以协助提供 谢谢 https://github.com/electerm/electerm/assets/50020959/2c8a8fe0-63bf-4a4d-8d17-e1e92c5a9cdd
Author
Owner

@zxdong262 commented on GitHub (May 14, 2024):

安装包是: electerm-1.39.5-win-x64-installer.exe

我录了视频给您参考,分别内容为1.39.5执行操作与于1.36.1(electerm-1.36.1-win-x64-installer.exe) 执行操作的过程

或是有其他调试log与设定我可以协助提供 谢谢

IMG_7160.MP4

明白了,已经打开了的话就会有问题

<!-- gh-comment-id:2110017391 --> @zxdong262 commented on GitHub (May 14, 2024): > 安装包是: electerm-1.39.5-win-x64-installer.exe > > 我录了视频给您参考,分别内容为1.39.5执行操作与于1.36.1(electerm-1.36.1-win-x64-installer.exe) 执行操作的过程 > > 或是有其他调试log与设定我可以协助提供 谢谢 > > IMG_7160.MP4 明白了,已经打开了的话就会有问题
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/electerm#1968
No description provided.