Browse Source

typo

pull/432/head
Darien Raymond 8 years ago
parent
commit
3112d3a2d3
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
  1. 2
      proxy/vmess/encoding/encoding_test.go
  2. 2
      proxy/vmess/encoding/server.go

2
proxy/vmess/encoding/encoding_test.go

@ -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()

2
proxy/vmess/encoding/server.go

@ -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