- Timestamp:
- 11/01/2016 07:08:47 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/0-logger.php
r4252 r4314 8 8 * 9 9 * SECURITY WARNING: You must redact any sensitive info before it's written to the log file. The best way to do 10 * that is to add entries to wcorg_log_redact_keys(), so that the caller remain clean. You can also do it before 11 * passing the data to this function, though. Right now this only redacts array keys, but it can be made more 12 * sophisticated in the future to handle additional cases. 10 * that is to add entries to redact_keys(), so that the caller remain clean. You can also do it before 11 * passing the data to this function, though. 13 12 * 14 * In the future, it may be helpful to decode JSON values and search them for redactable values, and to allow 15 * the caller to pass an array of strings that are sensitive and should be redacted. The latter would allow for 16 * redacting values that aren't known until runtime, and could be helpful in other cases too. 13 * @todo add current username to every entry, and update wp-cli command parsing regex to match 17 14 * 18 15 * @param string $error_code … … 43 40 /** 44 41 * Redact sensitive values from log entries 42 * 43 * Right now this only redacts array keys, but it can be made more sophisticated in the future to handle 44 * additional cases. 45 * 46 * In the future, it may be helpful to decode JSON values and search them for redactable values, and to allow 47 * the caller to pass an array of strings that are sensitive and should be redacted. The latter would allow for 48 * redacting values that aren't known until runtime, and could be helpful in other cases too. 45 49 * 46 50 * @param array $data
Note: See TracChangeset
for help on using the changeset viewer.