fix(relay): say which key was refused
The validation returns above the `log.info` that records a send_keys call, so a refused key left no trace whatsoever: the client got a generic "keys contain disallowed values" and the relay log stayed silent. That is exactly the case worth diagnosing, because it is what a client newer than its relay looks like -- the client believes it sent a key, the relay believes it said why it would not, and nothing on the server records which key was involved. Both the log line and the error now name the offending keys, and only those -- a rejected array is usually one unknown key among several valid ones, and echoing the whole array back makes the reader find it. The message is capped at four keys of 24 characters each, and the log at 120 via %.120r, so a client sending a large or hostile array cannot flood either. An empty or non-list `keys` gets its own log line, since it means something different: not an unknown key but a client that sent the wrong shape.
N
Nick007 committed
370c8f998a2c71c39f7d6dbdcdab3ceda82a3b57
Parent: 5d09f8a