paths.py should add dist-packages (import error in Mailman CGIs)

Bug #1621172 reported by Mark Sapiro
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Medium
Mark Sapiro

Bug Description

Mailman's paths.py adds the path to the invoking Python's /usr/lib/pythonx.y/site-packages directory to sys.path in case it's missing due to Python being invoked with -S or some other reason. It should also add /usr/lib/pythonx.y/dist-packages.

Related branches

Mark Sapiro (msapiro)
Changed in mailman:
status: New → Fix Committed
Revision history for this message
Mark Sapiro (msapiro) wrote :

Additional info on the impact of this bug.

Normally, the qrunner processes are not affected by this as the Python that runs mailmanctl is not invoked with a -S option.

The compiled wrappers that invoke the Mailman CGIs and the mail queueing scripts do invoke Python with a -S option for additional security. This is also not normally a problem because the CGIs and mail queueing scripts don't import anything outside of Mailman and the Python standard library, however if there are site or list modifications to use, for example, a modified MemberAdaptor that wants to import something such as 'ldap' which is outside of Mailman and the standard library, the path to that module must be in sys.path.

The fix committed here will help in those cases, but won't help if the required module is, for example, in /usr/local/lib/pythonx.y/*.

summary: - paths.py should add dist-packages
+ paths.py should add dist-packages (import error in Mailman CGIs)
Mark Sapiro (msapiro)
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.