Input values are not sanitized after they are deserialized, making it far too easy for Leo to earn SOL (#9706)
* sanitize gossip protocol messages * sanitize transactions * crds protocol sanitize
This commit is contained in:
committed by
GitHub
parent
c372a39dd3
commit
8ef097bf6f
@@ -49,6 +49,8 @@ impl Keypair {
|
||||
#[derive(Serialize, Deserialize, Clone, Copy, Default, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
pub struct Signature(GenericArray<u8, U64>);
|
||||
|
||||
impl crate::sanitize::Sanitize for Signature {}
|
||||
|
||||
impl Signature {
|
||||
pub fn new(signature_slice: &[u8]) -> Self {
|
||||
Self(GenericArray::clone_from_slice(&signature_slice))
|
||||
|
Reference in New Issue
Block a user