Last modified: 2010-05-15 15:38:32 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 T7405, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 5405 - shell_exec
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: 6298 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2006-03-31 02:53 UTC by Sami Sieranoja
Modified: 2010-05-15 15:38 UTC (History)
1 user (show)

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


Description Sami Sieranoja 2006-03-31 02:53:30 UTC
includes/Image.php uses the shell_exec -function resize images, which doesn't
work if safe-mode is on. I replaced this with exec, and resizing images started
to work. (convert -command is in safe_mode_exec_dir)
Comment 1 Brion Vibber 2006-03-31 03:14:00 UTC
We've explored this kind of thing before. The problem is just that safe_mode is inherently broken; exec()'s behavior is 
different under safe_mode and becomes very unreliable:

"With safe mode enabled, the command string is escaped with escapeshellcmd(). Thus, echo y | echo x becomes echo y 
\| echo x."

This will of course bork up the properly-escaped shell commands, so various filenames would stop working.

PHP 6 is removing the broken safe_mode option, so keep in mind it's unsupported.
Comment 2 Brion Vibber 2006-06-13 18:52:16 UTC
*** Bug 6298 has been marked as a duplicate of this bug. ***

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