Revert checking for negative constr on bool
It is impossible to serialize/deserialize a Data with a negative constructor. So the only way this can happen is by programmatically construct a value using builtin constr_data. While possible, it is entirely at the responsibility of the programmer, but not malleable from an attacker who can only provide values as 'Data' (and thus, must be decoded like others).
This commit is contained in:
parent
aefbc6e1b9
commit
49ddcccd12
|
@ -598,11 +598,6 @@ impl Term<Name> {
|
||||||
Term::less_than_equals_integer()
|
Term::less_than_equals_integer()
|
||||||
.apply(Term::integer(2.into()))
|
.apply(Term::integer(2.into()))
|
||||||
.apply(Term::fst_pair().apply(Term::Var(pair.clone())))
|
.apply(Term::fst_pair().apply(Term::Var(pair.clone())))
|
||||||
.if_then_else(
|
|
||||||
otherwise.clone(),
|
|
||||||
Term::less_than_integer()
|
|
||||||
.apply(Term::fst_pair().apply(Term::Var(pair.clone())))
|
|
||||||
.apply(Term::integer(0.into()))
|
|
||||||
.if_then_else(
|
.if_then_else(
|
||||||
otherwise.clone(),
|
otherwise.clone(),
|
||||||
callback(
|
callback(
|
||||||
|
@ -611,7 +606,6 @@ impl Term<Name> {
|
||||||
.apply(Term::fst_pair().apply(Term::Var(pair))),
|
.apply(Term::fst_pair().apply(Term::Var(pair))),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
otherwise.clone(),
|
otherwise.clone(),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue