[wp-trac] [WordPress Trac] #44458: Catch WSODs and provide a means for recovery for end users
WordPress Trac
noreply at wordpress.org
Mon Jun 25 15:41:38 UTC 2018
#44458: Catch WSODs and provide a means for recovery for end users
----------------------------+---------------------
Reporter: schlessera | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 5.0
Component: Bootstrap/Load | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+---------------------
Comment (by schlessera):
''(copied from Slack for future reference)''
I've started looking into this briefly, and here's what I've found out so
far:
- Exceptions don't help, as they are not fully integrated into the error
handling at PHP 5.2.
- We can use a shutdown handler to detect fatal errors and know where they
were triggered: https://3v4l.org/4jWAs .
- Such a shutdown handler could record a fatal error, and the next page
request could then detect a recorded fatal error and decide based on some
heuristics whether to initiate "safe mode". (edited)
There's an obvious security-related issue here:
This "safe mode" will skip loading plugins & themes, so it will also skip
any security-related enhancements that were done to the site. An attacker
might forcefully trigger the "safe mode" to get past security mechanisms.
Some other assumptions I'm making right now:
- We cannot just act on plugin activation/deactivation, as this will still
take the site down if we update PHP.
- We cannot disable a single plugin, as we cannot reliably detect who the
actual culprit is in all cases.
- We might be able to disable a single plugin in those cases where we hit
a parse error in a file of a plugin.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44458#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list