diff options
author | Joey Hess <joey@kitenet.net> | 2013-01-11 15:43:09 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-01-11 16:03:45 -0400 |
commit | 5387b44657d01e436282e3ae6650a8f083b5ef00 (patch) | |
tree | c208fb8505e28d1998ea96a1cf63929e9053749d /Fields.hs | |
parent | 4979c878da4dcacf699b4d0b2e2f173e0d0bd06e (diff) |
safe recv-key in direct mode
Checks the key's size and checksum. This is sorta expensive, but it avoids
needing to add another round-trip to the protocol.
Diffstat (limited to 'Fields.hs')
-rw-r--r-- | Fields.hs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -30,3 +30,6 @@ associatedFile :: Field associatedFile = Field "associatedfile" $ \f -> -- is the file a safe relative filename? not (isAbsolute f) && not ("../" `isPrefixOf` f) + +direct :: Field +direct = Field "direct" $ \f -> f == "1" |