pull/432/head
Darien Raymond 8 years ago
parent a3a772e1d0
commit 3112d3a2d3
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

@ -62,7 +62,7 @@ func TestRequestSerialization(t *testing.T) {
assert.Byte(byte(expectedRequest.Security)).Equals(byte(actualRequest.Security))
_, err = server.DecodeRequestHeader(buffer2)
// anti reply attack
// anti replay attack
assert.Error(err).IsNotNil()
cancel()

@ -165,7 +165,7 @@ func (v *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.Request
copy(sid.key[:], v.requestBodyKey)
copy(sid.nonce[:], v.requestBodyIV)
if v.sessionHistory.has(sid) {
return nil, errors.New("VMess|Server: Duplicated session id. Possibly under reply attack.")
return nil, errors.New("VMess|Server: Duplicated session id. Possibly under replay attack.")
}
v.sessionHistory.add(sid)

Loading…
Cancel
Save