Eip712 review (#355)
* Possible security fix. It is possible to send a new structure definition after sending a structure implementation, which makes the app treat unrestricted data as if it was a well defined structure. This commit tries to fix that behaviour. Once a structure implementation is sent, we consider all structures to be defined and we do not allow new definitions. * Fix previous commit
This commit is contained in:
@@ -363,6 +363,8 @@ bool path_set_root(const char *const struct_name, uint8_t name_length) {
|
||||
path_struct->root_type = ROOT_MESSAGE;
|
||||
}
|
||||
|
||||
struct_state = DEFINED;
|
||||
|
||||
// because the first field could be a struct type
|
||||
path_update();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user