Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#19584 closed Bug (fixed)

compilemessages does not report error when msgfmt fails or is missing

Reported by: kmichel_wgs 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 3 years ago by claudep

  • Component changed from Translations to Internationalization
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 3 years ago by ramiro

Last edited 3 years ago by ramiro (previous) (diff)

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

  • Resolution set to fixed
  • Status changed from new to closed

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 3 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