Tighten regex for key
This commit is contained in:
@@ -42,7 +42,7 @@ if ( $pid == 0 ) { # child
|
|||||||
LINE: while ( <$pty> ) {
|
LINE: while ( <$pty> ) {
|
||||||
chomp;
|
chomp;
|
||||||
if ( m{^MOSH CONNECT} ) {
|
if ( m{^MOSH CONNECT} ) {
|
||||||
if ( ( $port, $key ) = m{^MOSH CONNECT (\d+?) (.{22})} ) {
|
if ( ( $port, $key ) = m{^MOSH CONNECT (\d+?) ([A-Za-z0-9/+]{22})\s*$} ) {
|
||||||
last LINE;
|
last LINE;
|
||||||
} else {
|
} else {
|
||||||
die "Bad MOSH CONNECT string: $_\n";
|
die "Bad MOSH CONNECT string: $_\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user