-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added feature to check data signatures at Source.Python setup. #467
base: master
Are you sure you want to change the base?
Conversation
It works great and I really like the idea! That said, I'm not sure that is something that should be done by default. I can see the usefulness when updating the data, but I don't think all signatures should be validated and cached on every servers. Perhaps we could add an additional setting to As for the implementation itself, I don't necessarily see the need to re-invent the wheel and manually parse the files. What about using a temporary |
The problem is that the user doesn't know which function's signature is incorrect. Rather than actually running the code path of the incorrect function and then realizing that the signature is incorrect, it is more useful to notify the user from the beginning that there is a problem with the signature, so that the problem can be resolved quickly. I also don't see the problem to notify all users with the invalid signatures since they may not be familiar with the signatures themselves. Also, why is it such a problem to have signatures cached? I measured signatures that are not used by SP itself and only 775 bytes were used. If there is a problem with caching, I think
|
How is it unavoidable? Let's say you want to validate the functions of a type, all you really have to do is ensure all attributes resolve properly: # ../test.ini
binary = server
[function]
[[foo]]
identifier = 11 22 33 44 55 66 77 88 99 00
[[bar]]
identifier = 11 22 33 44 55 66 77 88 99 00
[[baz]]
identifier = 11 22 33 44 55 66 77 88 99 00
from memory.manager import TypeManager
from path import Path
Foo = TypeManager().create_type_from_file(
'Foo',
Path(__file__).parent / 'test.ini'
)
for attr in vars(Foo):
try:
getattr(Foo, attr)
except Exception as e:
print(f'Foo.{attr} -', e)
|
Forget about this, I will make full-fledged sanitizers. |
This will allow us to deal with signature changes more quickly and accurately than before.
Output at 9f38783
Output
Logs