Input values are not sanitized after they are deserialized, making it far too easy for Leo to earn SOL (bp #9706) (#9736)

automerge
This commit is contained in:
mergify[bot]
2020-04-27 16:23:59 -07:00
committed by GitHub
parent 34f5f48e43
commit 9c6f613f8c
13 changed files with 351 additions and 32 deletions

View File

@@ -28,6 +28,8 @@ impl<T> DecodeError<T> for PubkeyError {
#[derive(Serialize, Deserialize, Clone, Copy, Default, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct Pubkey([u8; 32]);
impl crate::sanitize::Sanitize for Pubkey {}
#[derive(Error, Debug, Serialize, Clone, PartialEq, FromPrimitive, ToPrimitive)]
pub enum ParsePubkeyError {
#[error("String is the wrong size")]