Last modified: 2014-01-16 04:45:52 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T61986, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59986 - PDFHandler should use wfShellExecWithStderr
PDFHandler should use wfShellExecWithStderr
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
PdfHandler (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Tony Thomas
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-13 04:19 UTC by Bawolff (Brian Wolff)
Modified: 2014-01-16 04:45 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bawolff (Brian Wolff) 2014-01-13 04:19:51 UTC
Marking easy, as this is probably a straightforward bug to fix.

Currently PDFHandler runs gs and convert in a pipeline (See PdfHandler::doTransform). It sticks 2>&1 on the end of the command to catch error output, however that doesn't apply to the whole pipeline, only the last command. Hence ghostscript (gs) errors are missed.

Recommended fix: remove the 2>&1, and instead of calling wfShellExec, call wfShellExecWithStderr. (This will also catch errors for other commands, like the resource limit things, so its better than using 2>&1 anyways).
Comment 1 Gerrit Notification Bot 2014-01-13 15:19:59 UTC
Change 107161 had a related patch set uploaded by 01tonythomas:
Removed the  2>&1 from doTransform and replaced wfShellExec with wfShellExecWithStderr

https://gerrit.wikimedia.org/r/107161
Comment 2 Gerrit Notification Bot 2014-01-16 04:44:32 UTC
Change 107161 merged by jenkins-bot:
Change  2>&1 in doTransform to use wfShellExecWithStderr instead

https://gerrit.wikimedia.org/r/107161
Comment 3 Bawolff (Brian Wolff) 2014-01-16 04:45:52 UTC
I misread the code, so this bug didn't really exist, but wfShellExecWithStderr still a good idea.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links