assistant: Improve sanity check for control characters when pairing.
This commit is contained in:
parent
bcf1b59c1b
commit
1316efdc6e
4 changed files with 18 additions and 15 deletions
|
@ -58,6 +58,15 @@ data PairData = PairData
|
|||
}
|
||||
deriving (Eq, Read, Show)
|
||||
|
||||
checkSane :: PairData -> Bool
|
||||
checkSane p = all (not . any isControl)
|
||||
[ fromMaybe "" (remoteHostName p)
|
||||
, remoteUserName p
|
||||
, remoteDirectory p
|
||||
, remoteSshPubKey p
|
||||
, fromUUID (pairUUID p)
|
||||
]
|
||||
|
||||
type UserName = String
|
||||
|
||||
{- A pairing that is in progress has a secret, a thread that is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue