klimuts / snx-client

Graphical user interface for CheckPoint SSL Network Extender (SNX) for Ubuntu.
MIT License
19 stars 0 forks source link

Connection failure #14

Open dmitryuk opened 5 months ago

dmitryuk commented 5 months ago

Describe the bug

To Reproduce Steps to reproduce the behavior:

  1. Enter password
  2. opening a new terminal window for a microsecond
  3. I see first screen with Connect button, Disconnected status, no error

I think the problem is that my password contains "`" symbol

Log file contains following:

05-Jul-2024 06:35:20.500 - [DEBUG] -         c.k.s.s.ShellCommandService - Execute shell command: [CONNECT: x-terminal-emulator -e sh -c 'bash state.sh %s';]
05-Jul-2024 06:35:20.737 - [DEBUG] -         c.k.s.s.ShellCommandService - Command [CONNECT] executed successfully, exit code: 0
05-Jul-2024 06:35:22.740 - [TRACE] -           c.k.s.s.ConnectionService - Start reading [snx error] from state file
05-Jul-2024 06:35:22.740 - [TRACE] -            c.k.s.s.StateFileService - State file is empty
insidesecurity-yhojann-aguilera commented 3 months ago

Same error, can not connect:

26-Aug-2024 21:38:02.339 - [TRACE] -    c.k.s.c.PasswordWindowController - [OK] button clicked
26-Aug-2024 21:38:02.339 - [TRACE] -           c.k.s.s.ConnectionService - Run [CONNECT] command
26-Aug-2024 21:38:02.339 - [DEBUG] -         c.k.s.s.ShellCommandService - Execute shell command: [CONNECT: x-terminal-emulator -e sh -c 'bash state.sh %s';]
26-Aug-2024 21:38:02.446 - [DEBUG] -         c.k.s.s.ShellCommandService - Command [CONNECT] failed, exit code: 1}
26-Aug-2024 21:38:04.453 - [TRACE] -           c.k.s.s.ConnectionService - Start reading [snx error] from state file
26-Aug-2024 21:38:04.453 - [TRACE] -            c.k.s.s.StateFileService - State file is empty
26-Aug-2024 21:38:04.453 - [TRACE] -           c.k.s.s.ConnectionService - Run [CHECK_TUNNEL_INTERFACE] command
26-Aug-2024 21:38:04.454 - [DEBUG] -         c.k.s.s.ShellCommandService - Execute shell command: [CHECK_TUNNEL_INTERFACE: ip address | grep tunsnx || true]
26-Aug-2024 21:38:04.461 - [DEBUG] -         c.k.s.s.ShellCommandService - Command [CHECK_TUNNEL_INTERFACE] executed successfully, exit code: 0
26-Aug-2024 21:38:04.461 - [TRACE] -           c.k.s.s.ConnectionService - Tunnel is down
26-Aug-2024 21:38:04.461 - [TRACE] -          c.k.s.s.ModalWindowService - Close modal window
26-Aug-2024 21:38:04.461 - [TRACE] -           c.k.s.s.ConnectionService - Run [CHECK_TUNNEL_INTERFACE] command
26-Aug-2024 21:38:04.461 - [DEBUG] -         c.k.s.s.ShellCommandService - Execute shell command: [CHECK_TUNNEL_INTERFACE: ip address | grep tunsnx || true]
26-Aug-2024 21:38:04.469 - [DEBUG] -         c.k.s.s.ShellCommandService - Command [CHECK_TUNNEL_INTERFACE] executed successfully, exit code: 0
klimuts commented 2 months ago

Hi @dmitryuk Sorry for the long reply

I think the problem is that my password contains "`" symbol

Most likely yes. When forming a shell command, this symbol may break all logic

Probably should make a check for forbidden characters and a warning popup accordingly