Message133432
My patch for issue #11133 introduced a regression: it is no longer possible to get attributes of modules. That is because modules use "tp_dictoffset" (at C level). The instance __dict__ is exposed to Python code using a types.MemberDescriptorType. My patch for issue #11133 currently assumes that accessing the instance __dict__ can trigger code execution, but that is impossible: The access itself can't trigger code execution (it just returns a PyObject in the C struct). Theoretically, it could return any Python object, but that doesn't matter, as the code that uses the object only calls dict methods directly, hence a TypeError is the worst thing that can happen (although it shouldn't ever happen in practise).
Attached is a patch that adds a test and fixes the issue. |
|
Date |
User |
Action |
Args |
2011-04-09 22:44:20 | Trundle | set | recipients:
+ Trundle, michael.foord |
2011-04-09 22:44:19 | Trundle | set | messageid: <1302389059.87.0.554654770337.issue11813@psf.upfronthosting.co.za> |
2011-04-09 22:44:16 | Trundle | link | issue11813 messages |
2011-04-09 22:44:16 | Trundle | create | |
|