sometimes authentication fails and passcode gets treated as shell input #42

Closed
opened 2022-11-23 22:46:02 +00:00 by mashuptwice · 3 comments
Contributor

Sometimes the authentication fails after pressing enter and part of the passcode gets treated as input to the shell.

Two examples:

╰─$ itd
Passkey: 056950
11:20PM FTL Error connecting to InfiniTime error="Authentication Failed"
╭─mashuptwice@yoga ~ ‹yoga› 
╰─$ 50                                                                                                                                                                                                         1 ↵
zsh: command not found: 50

╰─$ itd
Passkey: 056094 
11:41PM FTL Error connecting to InfiniTime error="Authentication Failed"
╭─mashuptwice@yoga ~ ‹yoga› 
╰─$ 4                                                                                                                                                                                                          1 ↵
cd: no such entry in dir stack

This happens seemingly at random, maybe once every 10 pairing attempts.

I use zsh and haven't tested it with bash yet.

Sometimes the authentication fails **after** pressing enter and part of the passcode gets treated as input to the shell. Two examples: ``` ╰─$ itd Passkey: 056950 11:20PM FTL Error connecting to InfiniTime error="Authentication Failed" ╭─mashuptwice@yoga ~ ‹yoga› ╰─$ 50 1 ↵ zsh: command not found: 50 ╰─$ itd Passkey: 056094 11:41PM FTL Error connecting to InfiniTime error="Authentication Failed" ╭─mashuptwice@yoga ~ ‹yoga› ╰─$ 4 1 ↵ cd: no such entry in dir stack ``` This happens seemingly at random, maybe once every 10 pairing attempts. I use zsh and haven't tested it with bash yet.
Owner

ITD's errors all follow Go's convention and start with lowercase letters. If you see capitalized error messages, they came from BlueZ, not ITD.

ITD's errors all follow Go's convention and start with lowercase letters. If you see capitalized error messages, they came from BlueZ, not ITD.
Owner

What happens is BlueZ returns an error before ITD even reads the whole passkey from stdin, so it gets left on there and zsh reads that after ITD exits.

What happens is BlueZ returns an error before ITD even reads the whole passkey from stdin, so it gets left on there and zsh reads that after ITD exits.
Owner

There isn't much I can do about this, so I will close this issue

There isn't much I can do about this, so I will close this issue
Sign in to join this conversation.
No description provided.