do not pass key to control port of xftp server (#1074)

This commit is contained in:
Evgeny Poberezkin
2024-03-28 18:16:36 +00:00
committed by GitHub
parent bbc9eccf4d
commit 44410535fd
2 changed files with 6 additions and 8 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ data CPClientRole = CPRNone | CPRUser | CPRAdmin
data ControlProtocol
= CPAuth BasicAuth
| CPStatsRTS
| CPDelete ByteString C.APublicAuthKey
| CPDelete ByteString
| CPHelp
| CPQuit
| CPSkip
@@ -23,7 +23,7 @@ instance StrEncoding ControlProtocol where
strEncode = \case
CPAuth tok -> "auth " <> strEncode tok
CPStatsRTS -> "stats-rts"
CPDelete fId fKey -> strEncode (Str "delete", fId, fKey)
CPDelete fId -> strEncode (Str "delete", fId)
CPHelp -> "help"
CPQuit -> "quit"
CPSkip -> ""
@@ -31,7 +31,7 @@ instance StrEncoding ControlProtocol where
A.takeTill (== ' ') >>= \case
"auth" -> CPAuth <$> _strP
"stats-rts" -> pure CPStatsRTS
"delete" -> CPDelete <$> _strP <*> _strP
"delete" -> CPDelete <$> _strP
"help" -> pure CPHelp
"quit" -> pure CPQuit
"" -> pure CPSkip