[wp-trac] [WordPress Trac] #14096: More protection against fatal errors from plugins

WordPress Trac noreply at wordpress.org
Mon Oct 28 01:40:20 UTC 2013


#14096: More protection against fatal errors from plugins
-----------------------------+----------------------
 Reporter:  nacin            |       Owner:
     Type:  feature request  |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Plugins          |     Version:
 Severity:  major            |  Resolution:  wontfix
 Keywords:  dev-feedback     |
-----------------------------+----------------------

Comment (by dd32):

 > Related: ​https://irclogs.wordpress.org/chanlog.php?channel=wordpress-
 dev&day=2013-10-26&sort=asc#m714213

 Attached my patch here: [attachment:14096.diff​]

 It's a hacky little hack that detects fatal errors during the Plugin
 inclusion loops by using a shutdown function - based off the global
 variables it can then determine which plugin we were including at the time
 of the fatal - once it knows what plugin caused it, it disables that
 plugin.

 I wrote it as a proof of concept, and it isn't really ideal for core
 inclusion at present but does open up a option to prevent plugins taking a
 site down.
 This also showed to me that it's possible for a plugin to fatal on
 inclusion, but NOT fatal during our plugin sandboxing, if a plugin uses a
 function from `pluggable.php` directly (or anything else that's not ready
 for purpose pre-init) then it's possible for it to fatal then, but the
 sandboxing said it's fine (as it's operating post-init there).

--
Ticket URL: <http://core.trac.wordpress.org/ticket/14096#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list