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:
@@ -600,17 +600,11 @@ impl Term<Name> {
|
|||||||
.apply(Term::fst_pair().apply(Term::Var(pair.clone())))
|
.apply(Term::fst_pair().apply(Term::Var(pair.clone())))
|
||||||
.if_then_else(
|
.if_then_else(
|
||||||
otherwise.clone(),
|
otherwise.clone(),
|
||||||
Term::less_than_integer()
|
callback(
|
||||||
.apply(Term::fst_pair().apply(Term::Var(pair.clone())))
|
Term::equals_integer()
|
||||||
.apply(Term::integer(0.into()))
|
.apply(Term::integer(1.into()))
|
||||||
.if_then_else(
|
.apply(Term::fst_pair().apply(Term::Var(pair))),
|
||||||
otherwise.clone(),
|
),
|
||||||
callback(
|
|
||||||
Term::equals_integer()
|
|
||||||
.apply(Term::integer(1.into()))
|
|
||||||
.apply(Term::fst_pair().apply(Term::Var(pair))),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
otherwise.clone(),
|
otherwise.clone(),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user