oracle: check response Content-Type
If not specified everything is allowed. Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
1853d0c713
commit
8e9302f40b
6 changed files with 90 additions and 13 deletions
|
@ -26,15 +26,16 @@ const MaxOracleResultSize = math.MaxUint16
|
|||
|
||||
// Enumeration of possible oracle response types.
|
||||
const (
|
||||
Success OracleResponseCode = 0x00
|
||||
ProtocolNotSupported OracleResponseCode = 0x10
|
||||
ConsensusUnreachable OracleResponseCode = 0x12
|
||||
NotFound OracleResponseCode = 0x14
|
||||
Timeout OracleResponseCode = 0x16
|
||||
Forbidden OracleResponseCode = 0x18
|
||||
ResponseTooLarge OracleResponseCode = 0x1a
|
||||
InsufficientFunds OracleResponseCode = 0x1c
|
||||
Error OracleResponseCode = 0xff
|
||||
Success OracleResponseCode = 0x00
|
||||
ProtocolNotSupported OracleResponseCode = 0x10
|
||||
ConsensusUnreachable OracleResponseCode = 0x12
|
||||
NotFound OracleResponseCode = 0x14
|
||||
Timeout OracleResponseCode = 0x16
|
||||
Forbidden OracleResponseCode = 0x18
|
||||
ResponseTooLarge OracleResponseCode = 0x1a
|
||||
InsufficientFunds OracleResponseCode = 0x1c
|
||||
ContentTypeNotSupported OracleResponseCode = 0x1f
|
||||
Error OracleResponseCode = 0xff
|
||||
)
|
||||
|
||||
// Various validation errors.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue