Just as the title reads: What, if any, are security implications that need to be considered when using and / or bypassing anonymous methods ( Action<> , Func<> ) in C #?
The method that accepts Action<> / Func<> seems to be a potential way to enter external code into a program. For the record, I understand that the introduced method or function cannot perform inherently unsafe things in the sense of random access to memory, but I think that it could allow the calling code to call, for example. arbitrary .Net infrastructure features, corrupted data, or other reasons why the application behaves badly.
Is this assumption wrong?
If this is not the case, what to do to block them? Also, is there a way to check / Func<> , which is passed to a method or function to ensure that it has the expected form or restricts its access to certain types and namespaces?
Also, forgive me if I do not quite use the correct terminology, I am still involved.
source share