This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Trundle
Recipients Trundle, michael.foord
Date 2011-04-09.22:44:15
SpamBayes Score 1.0436096e-13
Marked as misclassified No
Message-id <1302389059.87.0.554654770337.issue11813@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-04-09 22:44:20Trundlesetrecipients: + Trundle, michael.foord
2011-04-09 22:44:19Trundlesetmessageid: <1302389059.87.0.554654770337.issue11813@psf.upfronthosting.co.za>
2011-04-09 22:44:16Trundlelinkissue11813 messages
2011-04-09 22:44:16Trundlecreate