croc icon indicating copy to clipboard operation
croc copied to clipboard

Sender still waiting if receiver wrote the correct channel but the incorrect code

Open Ozoniuss opened this issue 1 year ago • 3 comments

Was just curious if this is the desired behavior. For example, consider this interaction with wormhole:

PC 1

PS C:\Users\qscxz> wormhole send .\file.txt
Sending 134.5 kB file named 'file.txt'
Wormhole code is: 72-tradition-keyboard
On the other computer, please run:

wormhole receive 72-tradition-keyboard

ERROR:  Key confirmation failed. Either you or your correspondent
typed the code wrong, or a would-be man-in-the-middle attacker guessed
incorrectly. Try sending the file again.

PC 2

PS C:\Users\qscxz> wormhole receive 72-traditiof-keyboard
ERROR:  Key confirmation failed. Either you or your correspondent
typed the code wrong, or a would-be man-in-thtone-middle attacker guessed
incorrectly. Try sending the file again.

The second PC wrote the code incorrectly, so the channel was closed. In croc, writing the same channel but the wrong code will also fail, but using the original code will also not work anymore:

PC 2

PS C:\Users\qscxz> croc 7263-vision-audio-francf
securing channel...2024/06/16 18:05:31 could not secure channel
PS C:\Users\qscxz> croc 7263-vision-audio-france
securing channel...2024/06/16 18:05:35 room (secure channel) not ready, maybe peer disconnected

Is this the intention? If not, what would be the desired behaviour? (keeping the channel open is also an option) I'd be happy to contribute once you reply.

Ozoniuss avatar Jun 16 '24 15:06 Ozoniuss

yes. if the receiver types in the wrong code the sender is alerted and a new code is needed

schollz avatar Jun 16 '24 15:06 schollz

Thanks. This isn't the current behaviour in 10.0.8 or latest (my croc executable version was 10.0.7, so I ran it from source for 10.0.8, see below). I'll work on a PR so the sender is alerted as well.

image

Ozoniuss avatar Jun 16 '24 15:06 Ozoniuss

looking forward to the PR!

schollz avatar Jun 16 '24 16:06 schollz