Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#19584 closed Bug (fixed)

compilemessages does not report error when msgfmt fails or is missing

Reported by: Kevin Michel Owned by: nobody
Component: Internationalization Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


compile_messages does not check and propagate the return code of the os.system call to msgfmt :

A quick grep tells that it's the only unchecked usage of os.system in Django.

Change History (4)

comment:1 Changed 7 years ago by Claude Paroz

Component: TranslationsInternationalization
Triage Stage: UnreviewedAccepted

comment:2 Changed 7 years ago by Ramiro Morales

Last edited 7 years ago by Ramiro Morales (previous) (diff)

comment:3 Changed 7 years ago by Ramiro Morales <cramm0@…>

Resolution: fixed
Status: newclosed

In dfa9324966ce1a38346d15e35805d042848aabf1:

Don't use os.system() in compilemessages.

Fixes #19584.

This implies stop storing file path command line arguments in envvars as
a security measure to start relying on with Popen's shell=False instead,
and addition of an 'utils' module.

Thanks kmichel_wgs for the report.

comment:4 Changed 7 years ago by Ramiro Morales <cramm0@…>

In 7fca4416c7f7ce66d528f0d1ad829cf3b8290b89:

Made (make|compile)messages check for availability of gettext commands.

Refs #19584.

Note: See TracTickets for help on using tickets.
Back to Top