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.
Created on 2011年04月09日 22:44 by Trundle, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| getattr_static_modules.patch | Trundle, 2011年04月09日 22:44 | review | ||
| Messages (3) | |||
|---|---|---|---|
| msg133432 - (view) | Author: Andreas Stührk (Trundle) * | Date: 2011年04月09日 22:44 | |
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. |
|||
| msg149803 - (view) | Author: Michael Foord (michael.foord) * (Python committer) | Date: 2011年12月18日 21:25 | |
I'd like to commit this patch. What's your real name Trundle, for the NEWS entry? |
|||
| msg149804 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年12月18日 22:07 | |
New changeset 56731ccf2e86 by Michael Foord in branch '3.2': Fix inspect.getattr_static to work on modules (again). http://hg.python.org/cpython/rev/56731ccf2e86 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:16 | admin | set | github: 56022 |
| 2011年12月18日 22:07:17 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg149804 resolution: fixed stage: patch review -> resolved |
| 2011年12月18日 21:25:52 | michael.foord | set | assignee: michael.foord messages: + msg149803 |
| 2011年10月09日 21:53:49 | ezio.melotti | set | priority: normal -> high |
| 2011年07月15日 18:55:32 | pitrou | set | stage: patch review |
| 2011年04月11日 15:17:40 | eric.araujo | set | nosy:
+ eric.araujo |
| 2011年04月09日 22:44:16 | Trundle | create | |