Coder Social home page Coder Social logo

wpwhitesecurity / wp-security-audit-log Goto Github PK

View Code? Open in Web Editor NEW
30.0 12.0 19.0 14.52 MB

WP Activity Log is the most comprehensive and #1 user-rated activity log plugin for WordPress with the broadest coverage.

Home Page: https://wpactivitylog.com

License: Other

PHP 86.54% CSS 4.80% SCSS 0.13% JavaScript 8.54%
activity-logger activity-log activity-logging activity-log-wordpress worpdress-plugin

wp-security-audit-log's Introduction

=== WP Activity Log ===
Contributors: Melapress
Plugin URI: https://melapress.com/wordpress-activity-log/
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl.html
Tags:  activity log, security audit log, user tracking, security event log, audit trail, user activity, changelog, history, log, website changes
Requires at least: 5.0
Tested up to: 6.4.3
Stable tag: 4.6.3
Requires PHP: 7.2

Keep a comprehensive log of user and system changes that take place on your WordPress website with the the #1 user-rated activity log plugin.

== Description ==

### WP Activity Log is the most comprehensive activity log plugin for logging user and system changes.

Keep an [activity log](https://melapress.com/wordpress-activity-log/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal) of everything that happens on your WordPress sites and multisite networks with the WP Activity Log plugin to:

* Ensure user productivity
* Improve user accountability
* Ease troubleshooting
* Know exactly what all your users are doing
* Better manage & organize your WordPress site & users
* Easily spot suspicious behavior before there are security problems.

[WP Activity Log](https://melapress.com/wordpress-activity-log/features/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal) is the most comprehensive real-ime user activity and monitoring log plugin. It helps hundreds of thousands of WordPress administrators and security professionals keep an eye on what is happening on their websites and is the most highly-ated activity log plugin for WordPress.

[youtube https://www.youtube.com/watch?v=pgFEMIvKFTA]

[Features](https://melapress.com/wordpress-activity-log/features/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal) | [Get WP Activity Log Premium](https://melapress.com/wordpress-activity-log/pricing/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal) | [Getting Started](https://melapress.com/support/kb/wp-activity-log-getting-started/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal)

WP Activity Log has been featured on the websites of some of the most popular and leading businesses in the WordPress ecosystem, such as WPBeginner, GoDaddy, and Kinsta.

#### MAINTAINED & SUPPORTED BY MELAPRESS

Melapress develops high-quality WordPress management and security plugins such as [Melapress Login Security](https://melapress.com/wordpress-login-security/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal), [CAPTCHA 4WP](https://melapress.com/wordpress-captcha/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal), and [WP 2FA](https://melapress.com/wordpress-2fa/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal), the #1 user-rated activity log plugin for WordPress.

Browse our list of [WordPress security and administration plugins](https://melapress.com/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal) to see how our plugins can help you better manage and improve the security and administration of your WordPress websites and users.
  
### WordPress changes and details the WP Activity Log keeps a log of
As a comprehensive and thorough activity log solution for WordPress, WP Activity Log not only tells you that a post, a user profile, or an object was updated, it also lets you know exactly what was changed within the post, the user profile, or the object.

Below is a summary of the changes that the plugin can keep a record of:

- **Post, page and custom post type changes** such as status, [content changes](https://melapress.com/support/kb/wp-activity-log-how-keep-record-of-content-changes/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal), title, URL, custom field, and other metadata changes

- **Tags and categories changes** such as creating, modifying or deleting them, and adding or removing them from posts

- **Widgets and menus changes** such as creating, modifying, or deleting them

- **User changes** such as user created or registered, deleted, or added to a site on multisite network

- **User profile changes** such as password, email, display name, and role changes

- **User activity** such as login, logout, failed logins, and terminating other sessions

- **WordPress core and settings changes** such as installed updates, permalinks, default role, URL, and other site-wide changes

- **WordPress multisite network changes** such as adding, deleting or archiving sites, adding or removing users from sites etc ([activity logs for multisite networks](https://melapress.com/support/kb/wp-activity-log-multisite-network-features/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal)).

- **Plugins and Themes changes** such as installing, activating, deactivating, uninstalling, and updating

- **WordPress database changes** such as when a plugin adds or removes a table

- Changes on **WooCommerce Stores & products**, **Yoast SEO**, **WPForms**, **Gravity Forms**, **Advanced Custom Fields (ACF)**, **MainWP** and other popular WordPress plugins.

- **[WordPress site file changes](https://melapress.com/support/kb/wp-activity-log-wordpress-files-changes-warning-activity-logs/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal)** such as new files are added, or existing ones are modified or deleted.

For every event that the plugin records it also reports the:

* Date & time (and milliseconds) of when it happened
* User & role of the user who did the change
* Source IP address from where the change happened
* The object on which the change has taken place

Refer to [WordPress activity log event IDs](https://melapress.com/support/kb/wp-activity-log-list-event-ids/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal) for a complete list of all the changes WP Activity Log can keep a record of and a detailed explanation of what change every event ID represents.

### Upgrade to WP Activity Log Premium and get even more

The premium version of WP Activity Log comes bundled with even more features to take your WordPress website administration and security to the next level.

With the premium edition of WP Activity Log, you get:

### Premium features list

- See who is logged to your website in real-time,
- See what everyone is doing in real-time,
- Log off any user with just a click,
- Generate HTML and CSV reports,
- Get notified via email of important changes,
- Get instant SMS message alerts of critical site changes,
- Search filters to fine tune the search results and find what you need in seconds,
- Store activity log in an external database to improve security and scalability,
- Mirror the activity log to logs management systems such as AWS CloudWatch, Loggly and Papertrail in real-time,
- Easily mirror the logs in real-time to business communication systems such as Slack,
- Send a copy of your websites' activity log to a log file on your web server in real-time,
- Archive old activity log data to another database for better storage and log management.

Refer to the [WP Activity Log plugin features and benefits page](https://melapress.com/wordpress-activity-log/features/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal) to learn more about the benefits of upgrading to WP Activity Log Premium.

#### WP Activity Log third-party plugin support

WP Activity Log can keep also a detailed log of changes that happen on third-party plugins, including:

- <strong>WooCommerce</strong>: Keep a log of changes you and your team do in the WooCommerce store settings, orders, products, coupons, and much more.
- <strong>Yoast SEO</strong>: Keep a log of the Yoast SEO plugin settings changes, and also of the on-page SEO changes you and your team make in the Yoast SEO meta box.
- <strong>WPForms</strong>: Keep a log of the changes your team does in the WPForms plugin settings, forms, form files, entries (leads) and more.
- <strong>Gravity Forms</strong>: Keep a log of the changes your team does in the Gravity Forms plugin settings, forms, forms settings, entries (leads) and more.
- <strong>MemberPress</strong>: Keep a log of the changes in your MemberPress powered website, including plugin settings changes, memberships, payments, subscriptions and other changes that your team does on your website.
- <strong>bbPress</strong>: Keep a log of changes in bbPress forums, topics, bbPress settings and more.
- <strong>MainWP</strong>: Keep a log of the MainWP network changes and can see the activity logs of all child sites from one central location - the MainWP dashboard.

Refer to [activity logs for third party WordPress plugins](https://melapress.com/wordpress-activity-log/third-party-plugins/) for a complete list of all the plugins WP Activity Log can keep a log of.

#### Other Noteworthy Features
On top of the comprehensive activity log, WP Activity Log also has a number of non-logging specific features that make it a complete WordPress logging solution, such as:

- Full [WordPress multisite support](https://melapress.com/support/kb/wp-activity-log-multisite-network-features/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal)
- Easily [create your custom alerts & notifications](https://melapress.com/support/kb/wp-activity-log-create-custom-events/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal) to monitor additional functionality
- Built-in [support for reverse proxies and web application firewalls](https://melapress.com/support/kb/wp-activity-log-support-reverse-proxies-web-application-firewalls/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal)
- Integration with WhatIsMyIpAddress.com allow you to get all information about an IP address with just a mouse click.
- Limit who can view the WordPress activity log by users or roles
- Settings to [toggle (enable/disable) individual event IDs from the activity log](https://melapress.com/support/kb/exclude-logging-specific-change-activity-log/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal)
- Configurable dashboard widget highlighting the most recent critical activity
- Configurable [WordPress activity log retention policies](https://melapress.com/support/kb/wp-activity-log-retention-policies/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal)
- User avatar is displayed in the events for better recognizability
- and much more...
    
## Free and premium support

Premium world-class support for WP Activity Log is free via email or through the WordPress support forums.

Note: Paid customer support is given priority and is provided via one-to-one email. Upgrade to Premium to benefit from priority support.

For any other queries, feedback, or if you simply want to get in touch with us, please use our [contact form](https://melapress.com/contact/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal).

### As featured on:

- [Kinsta](https://kinsta.com/blog/wordpress-activity-log/)
- [Pagely](https://pagely.com/blog/2015/01/log-wordpress-dashboard-activity-improved-security-auditing/)
- [Shout Me Loud](https://www.shoutmeloud.com/wordpress-security-audit-log.html)
- [The Dev Couple](https://thedevcouple.com/wp-security-audit-log-review/)
- [WPKube](http://www.wpkube.com/improve-wordpress-security-wp-security-audit-log/)
- [Techwibe](https://www.techwibe.com/wp-security-audit-log-wordpress-plugin/)
- [Tidy Repo](https://tidyrepo.com/wp-security-audit-log-wordpress-activity-log/)
- [KitPloit](http://www.kitploit.com/2016/10/wp-security-audit-log-ultimate.html)
- and many others.

## Related links and documentation:

You can find more detailed information about WP Activity Log and its benefits in the links below

- [The WP Activity Log plugin website](https://melapress.com/wordpress-activity-log/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal)
- [List of WordPress activity log event IDs](https://melapress.com/support/kb/wp-activity-log-list-event-ids/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal)
- [WP Activity Log benefits and features](https://melapress.com/wordpress-activity-log/features/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal)
- [WordPress Multisite Features](https://melapress.com/support/kb/wp-activity-log-multisite-network-features/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal)
- [The definitive WordPress security guide](https://melapress.com/wordpress-security/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal)

== Installing WP Activity Log ==

=== Install WP Activity Log from within WordPress ===

1. Visit 'Plugins > Add New'
1. Search for 'WP Activity Log'
1. Install and activate the WP Activity Log plugin
1. Allow or skip diagnostic tracking

=== Install WP Activity Log manually ===

1. Extract the plugin ZIP file and upload it to the `/wp-content/plugins/` directory
1. Activate the WP Activity Log plugin from the 'Plugins' menu in WordPress
1. Allow or skip diagnostic tracking

== Frequently Asked Questions ==

= Does the free version of WP Activity Log limit the data it collects? =
No, the free version does not limit the data the plugin collects. The preium version adds additional features such as extensive log filtering options, external database/log management service integration, user session management, and much more.

= How long can I keep the log data for? =
You can keep the log data for as long as you want to, with no limits whatsoever placed on data retention. You can keep the log data forever if you want to.

= Does the plugin send any log data to Melapress? =
No, the plugin does not send any log data to us whatsoever. The only data we recieve is license data from the premium edition of the plugin.

= Does the plugin receive updates? =
We update the plugin fairly regularly to ensure the plugin continues to run in tip-top shape while adding new features from time to time.

= Will WP Activity Log slow down my website? =
[WP Activity Log will not slow down your website](https://melapress.com/support/kb/wp-activity-log-slow-down-website/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal). Each release is tested before release to ensure it works in the best way possible. Having said that, you need to make sure your WordPress web server has adequate resources to manage the load of your website.

= Support and Documentation =
Please refer to our [support pages](https://melapress.com/support/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal) for all the technical and product documentation.

== Screenshots ==

1. The WordPress activity logs from where the site administrator can see all the user and site changes.
2. See who is logged in to your WordPress and manage users sessions with Users Sessions Management.
3. The plugin settings from where site administrator can configure generic plugin settings such as [reverse proxy support](https://melapress.com/support/kb/wp-activity-log-support-reverse-proxies-web-application-firewalls/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal), who can manage the plugin etc.
4. The WordPress audit trail settings from where you can configure automatic pruning of alerts, which timestamp should be used and more.
5. Configuring WordPress email and SMS alerts with the Email & SMS Notifications module.
6. Search in the WordPress activity log with the use filters to fine tune the search results.
7. The Enable/Disable events section from where Administrators can disable or enable activity log events.
8. The Log Viewer of a Super Admin in a WordPress multisite network installation with the Site selection drop down menu.
9. WP Activity Log is integrated with the built-in revision system of WordPress, thus allowing you to see what content changes users make on your WordPress posts, pages and custom post types. For more information read [Keep Record of All WordPress Content Changes](https://melapress.com/support/kb/wp-activity-log-how-keep-record-of-content-changes/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal)
10. Mirror the WordPress activity log to an external solution such as Syslog or Papertrail to centralize logging, ensure logs are always available and cannot be tampered with in the unfortunate case of a hack attack.

== Changelog ==

= 4.6.3 (2024-02-07) =

* **Improvements**
	* Added support to the new plans and prices (February 2024 change).
	* Upgraded the Freemius SDK to 2.6.2.
	* Updated a number of links in the plugin (links used in help text etc).
	* Removed hardcoding of post types and post statuses in search filters.

 * **Bug fixes**
	 * Option for event ID 5709 was not showing when filtering the list of event IDs in the Enable/Disable events section.
	 * Fixed error generated when duplicating forms on Gravity Forms.
	 * Fixed: plugin keeping a log of forms submission even when the option to keep a log by website visitors was disabled.
	 * Added event ID check when extracting the last occurrence from the database.
	 * Addressed a number of PHP errors generated when running the plugin on PHP 8.2
	 * Fixed a server error generated when exporting search results.

Refer to the complete [plugin changelog](https://melapress.com/support/kb/wp-activity-log-plugin-changelog/?utm_source=wp+repo&utm_medium=repo+link&utm_campaign=wordpress_org&utm_content=wsal) for more detailed information about what was new, improved and fixed in previous version updates of WP Activity Log.

wp-security-audit-log's People

Contributors

asharirfan avatar carmelopreeostudios avatar chrisvanpatten avatar dannywpws avatar markdelf avatar martinkrcho avatar pattonwebz avatar robert81 avatar sdobreff avatar sndobreff avatar uuf6429 avatar wp-kitten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wp-security-audit-log's Issues

Refresh Audit View Setting not working

By default the Refresh Audit View option is set to automatic. Though it is impossible to switch if off, i.e. once you try and save the settings the option is reverted back to automatic.

Please also update the text of this setting with the below:

Option name: Refresh Audit Log Viewer
Option-value-1: Automatic โ€” Refresh Audit Log Viewer as soon as there are new alerts.
Option-value-2: Manual โ€” Refresh Audit Log Viewer only when the page is reloaded.

Excluded custom fields should be listed underneath each other

Excluded custom fields should be listed one under the other in the settings page. At the moment they are being listed one next to each other. Although this is the WordPress standard it is very difficult to find a particular one should there be a lot.

Is it possible to also sort them out in alphabetical order?

Poor db design for high traffic sites

There's a few issues with WP-Security-Audit-Log when you have a larger audit table and the plugin tries to a do a few things. Queries like:

SELECT * FROM `wp_wsal_occurrences`
            WHERE alert_id = 1002 AND site_id = 1
                AND (created_on BETWEEN 1405296000 AND 1405382399)
                AND id IN (
                    SELECT occurrence_id as id
                    FROM `wp_wsal_metadata`
                    WHERE (name = "ClientIP" AND value = '\"66.221.34.63\"')
                       OR (name = "Username" AND value = '\"Dana41Zoajez\"')
                    GROUP BY occurrence_id
                    HAVING COUNT(*) = 2
                );

and simply:

SELECT * FROM wp_wsal_metadata WHERE occurrence_id = 18475

are both poorly indexed. In particular wp_wsal_metadata.name is a TEXT column type, where it could really be a varchar() and have an index it seems.

I've added these two indexes (below). It might be worth adding these to your standard distro:

ALTER TABLE wp_wsal_occurrences ADD INDEX `alert_site_created` (`site_id`, `alert_id`, `created_on`);
ALTER TABLE wp_wsal_metadata ADD INDEX (`occurrence_id`);

Audit Log Viewer not working on WP Engine Install

@carmelopreeostudios on a WP Engine install the Audit Log Viewer is not working, i.e. the plugin logs alerts and work normally though when users access the Audit Log Viewer they get a blank page.

WP Engine support said the following "an error 500 (trying to make the server do something that isn't allowed, essentially). I've traced it back to the Render() method for the AbstractClass."

One user gave us access to a staging website of his to test the installation. Will send you the credentials via email so we can test this and fix it for 1.5.2.

Plugin Settings Need to Be Generated Upon Install

The plugin settings in the WordPress option table, such as "wsal-pruning-date" are not generated during install but only generated once the user accesses the plugin's settings the first time. Such settings should be created upon install, hence during an activation the plugin should:

  1. Check if there are the settings specified already
  2. If they are specified it should check that ALL settings are there. If any are missing they should be populated with the default values
  3. If it finds no settings at all it should generate them with the default settings the plugin is shipped with.

Alert 1002 is using a deprecated argument

@carmelopreeostudios when the plugin is generating alert 1002 the below is being reported in the debug.log:

 [18-Feb-2015 20:53:45 UTC] PHP Notice:  WP_User->id was called with an argument that is <strong>deprecated</strong> since version 2.1! Use <code>WP_User->ID</code> instead. in C:\wamp\htdocswp\wp-includes\functions.php on line 3495

Sending you the complete log file and stack trace via email.

WordPress Database Error Table (New Settings Table)

It seems that the new settings table (wp_wsal_options) is being called during installation / activation before the table itself is created. In fact upon installing the plugin the following errors are reported in the debug log file:

 [05-Mar-2015 20:16:26 UTC] WordPress database error Table 'wpdb.wp_wsal_options' doesn't exist for query SELECT * FROM wp_wsal_options WHERE option_name = 'wsal-dev-options' made by activate_plugin, include_once('C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\wp-security-audit-log.php'), WSAL_SensorManager->HookEvents, WSAL_Sensors_PhpErrors->HookEvents, WSAL_Settings->IsPhpErrorLoggingEnabled, WSAL_Settings->IsDevOptionEnabled, WpSecurityAuditLog->GetGlobalOption, WSAL_DB_Option->GetOptionValue, WSAL_DB_Option->GetNamedOption, WSAL_DB_ActiveRecord->Load

 [05-Mar-2015 20:16:26 UTC] WordPress database error Table 'wpdb.wp_wsal_options' doesn't exist for query SELECT * FROM wp_wsal_options WHERE option_name = 'wsal-version' made by activate_plugin, do_action('activate_wp-security-audit-log/wp-security-audit-log.php'), call_user_func_array, WpSecurityAuditLog->Install, WpSecurityAuditLog->GetOldVersion, WpSecurityAuditLog->GetGlobalOption, WSAL_DB_Option->GetOptionValue, WSAL_DB_Option->GetNamedOption, WSAL_DB_ActiveRecord->Load

IP Address not being retrieved in specific scenarios

As explained over email there are some specific scenarios where the IP address is not being populated in the alerts, instead "unkown" is shown.

Please advise what information you need from the users to allow us to troubleshoot this issue.

License activation of Premium Add-Ons is failing

Since the database change in version 1.5 (created a new settings table for the plugin) the license activations of the premium addons listed below is not working.

It is not working as the licensing module should be writing to the settings table which now has been moved. I will send you an email with a test license so the issue can be reproduced and fixed for 1.5.1.

Errors when Enabling the Hide Option

When I enable the hide option the following errors are generated in the debug log, even though the option is working:

 [18-Jan-2015 10:33:29 UTC] PHP Notice:  Undefined index: EnableProxyIpCapture in C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\Views\Settings.php on line 55

 [18-Jan-2015 10:33:29 UTC] PHP Stack trace:

 [18-Jan-2015 10:33:29 UTC] PHP   1. {main}() C:\wamp\htdocswp\wp-admin\admin.php:0

 [18-Jan-2015 10:33:29 UTC] PHP   2. do_action() C:\wamp\htdocswp\wp-admin\admin.php:212

 [18-Jan-2015 10:33:29 UTC] PHP   3. call_user_func_array() C:\wamp\htdocswp\wp-includes\plugin.php:496

 [18-Jan-2015 10:33:29 UTC] PHP   4. WSAL_ViewManager->RenderViewBody() C:\wamp\htdocswp\wp-includes\plugin.php:496

 [18-Jan-2015 10:33:29 UTC] PHP   5. WSAL_AbstractView->RenderContent() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\ViewManager.php:199

 [18-Jan-2015 10:33:29 UTC] PHP   6. WSAL_Views_Settings->Render() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\AbstractView.php:128

 [18-Jan-2015 10:33:29 UTC] PHP   7. WSAL_Views_Settings->Save() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\Views\Settings.php:86

 [18-Jan-2015 10:33:29 UTC] PHP Notice:  Undefined index: EnableIpFiltering in C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\Views\Settings.php on line 56

 [18-Jan-2015 10:33:29 UTC] PHP Stack trace:

 [18-Jan-2015 10:33:29 UTC] PHP   1. {main}() C:\wamp\htdocswp\wp-admin\admin.php:0

 [18-Jan-2015 10:33:29 UTC] PHP   2. do_action() C:\wamp\htdocswp\wp-admin\admin.php:212

 [18-Jan-2015 10:33:29 UTC] PHP   3. call_user_func_array() C:\wamp\htdocswp\wp-includes\plugin.php:496

 [18-Jan-2015 10:33:29 UTC] PHP   4. WSAL_ViewManager->RenderViewBody() C:\wamp\htdocswp\wp-includes\plugin.php:496

 [18-Jan-2015 10:33:29 UTC] PHP   5. WSAL_AbstractView->RenderContent() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\ViewManager.php:199

 [18-Jan-2015 10:33:29 UTC] PHP   6. WSAL_Views_Settings->Render() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\AbstractView.php:128

 [18-Jan-2015 10:33:29 UTC] PHP   7. WSAL_Views_Settings->Save() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\Views\Settings.php:86

Attached is also a screenshot of the error.
enabling_hide

Alert 1000 (Login) not generated with Rublon Installed

When I login to the website which has the Rublon plugin intsalled, Alert 1000 (Login) is not being generated. Below is an abstract from the PHP error log file:

PHP Fatal error:  Uncaught exception 'Exception' with message 'Alert with code "1000" has not be registered.' in /wp-content/plugins/wp-security-audit-log/classes/AlertManager.php:111
Stack trace:
#0 /wp-content/plugins/wp-security-audit-log/classes/AlertManager.php(108): WSAL_AlertManager->_CommitItem(1000, Array, NULL, false)
#1 /wp-content/plugins/wp-security-audit-log/classes/AlertManager.php(122): WSAL_AlertManager->_CommitItem(1000, Array, NULL)
#2 [internal function]: WSAL_AlertManager->_CommitPipeline('')
#3 /wp-includes/plugin.php(505): call_user_func_array(Array, Array)
#4 /wp-includes/load.php(613): do_action('shutdown')
#5 [internal function]: shutdown_action_hook()
#6 {main} thrown in /wp-content/plugins/wp-security-audit-log/classes/AlertManager.php on line 111

Pruning not working - Problem definitely from the 2 options

Pruning is still not working and can confirm that the problem is related to the way the "pruning options" are being used.

In fact when one of the options is disabled, the pruning works fine. In this case it is easier to simply completely remove the option to limit number of alerts by number and leave only the option to limit the number of alerts by time.

Alert 4002 (Change of user role) Still generated when user is excluded

Scenario: user "admin" and role "administrator" are excluded.

When "admin" with administrator role changes the role of another user from administrator to author, the plugin still creates Alert 4002 (User role change) even though the user doing the change is excluded from monitoring.

This could be related to the fact that the author role is being used in the alert.

Plugin is_admin Hotfix - Alerts are not working

@markdelf @carmelopreeostudios

I tested the plugin hotfix (#51) and can confirm the below alerts are not working:

  1. Content alerts (anything related to blog posts, pages and custom posts) are not working.
  2. move widget between containers, alert 2045
  3. move widget in same container, alert 2071
  4. user deletes category, alert 2024
  5. user creates category, alert 2023

Alert 1001 Generated When Someone Accesses Logout Link without a session

When someone accesses the below URL from a website it triggers a 1001 alert with unknown username, even though there never was a session:

website/wp-login.php?action=logout

More details in this ticket: https://wordpress.org/support/topic/too-many-records-with-1001-code?replies=2

As discussed yesterday we should bypass this by checking the User ID with wordpress prior to issuing the alert. If user ID is 0 do not issue such alert.

PHP Error log file populated with WSAL errrors

The error is:

 WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%d ORDER BY created_on ASC LIMIT  1470' at line 1 for query SELECT * FROM x_wsal_occurrences WHERE created_on < %d ORDER BY created_on ASC LIMIT  1470 made by do_action_ref_array, call_user_func_array, WpSecurityAuditLog->CleanUp, call_user_func, WSAL_Loggers_Database->CleanUp, WSAL_DB_OccurrenceQuery->Delete

More info in this ticket:

https://wordpress.org/support/topic/syntax-error-d-not-replaced?replies=6#post-6226629

Note: As highlighted in the ticket I am unable to reproduce any of the issues in our test scenarios hence if they click something then let's fix them, if not let's wait for the user to get back to us.

Super Admin role not reported when accessing site on a network

explaining scenario first:

Main network is installed on wpwhitehats.com
One of the sites on the network is site1.wpwhitehats.com

when a site1 user logs in to the site everything is ok. When the SUPER ADMiN (super admin typically has access to all the multisite network, including sub sites etc) logs in to the sub site (site1.wpwhitehats.com) because the super administrator does not have a specific role on that specific site, the role is being reported as unkown.

In multisite can we make a check and if the user is superadmin always report that role irrelevant of on which site he is logged in?

Plugin Hotfix - Plugin Cannot be activated

The plugin hotfix cannot be activated. Upon trying to activate it the following error is being generated:

 [18-Mar-2015 21:45:32 UTC] PHP Fatal error:  Call to a member function CurrentUserCan() on a non-object in C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\Views\Settings.php on line 7

 [18-Mar-2015 21:45:32 UTC] PHP Stack trace:

 [18-Mar-2015 21:45:32 UTC] PHP   1. {main}() C:\wamp\htdocswp\wp-admin\plugins.php:0

 [18-Mar-2015 21:45:32 UTC] PHP   2. activate_plugin() C:\wamp\htdocswp\wp-admin\plugins.php:40

 [18-Mar-2015 21:45:32 UTC] PHP   3. include_once() C:\wamp\htdocswp\wp-admin\includes\plugin.php:542

 [18-Mar-2015 21:45:32 UTC] PHP   4. WpSecurityAuditLog::GetInstance() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\wp-security-audit-log.php:583

 [18-Mar-2015 21:45:32 UTC] PHP   5. WpSecurityAuditLog->__construct() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\wp-security-audit-log.php:111

 [18-Mar-2015 21:45:32 UTC] PHP   6. WSAL_ViewManager->__construct() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\wp-security-audit-log.php:133

 [18-Mar-2015 21:45:32 UTC] PHP   7. WSAL_ViewManager->AddFromFile() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\ViewManager.php:20

 [18-Mar-2015 21:45:32 UTC] PHP   8. WSAL_ViewManager->AddFromClass() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\ViewManager.php:41

 [18-Mar-2015 21:45:32 UTC] PHP   9. WSAL_Views_Settings->__construct() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\ViewManager.php:49

 [18-Mar-2015 21:45:34 UTC] PHP Fatal error:  Call to a member function CurrentUserCan() on a non-object in C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\Views\Settings.php on line 7

 [18-Mar-2015 21:45:34 UTC] PHP Stack trace:

 [18-Mar-2015 21:45:34 UTC] PHP   1. {main}() C:\wamp\htdocswp\wp-admin\plugins.php:0

 [18-Mar-2015 21:45:34 UTC] PHP   2. plugin_sandbox_scrape() C:\wamp\htdocswp\wp-admin\plugins.php:153

 [18-Mar-2015 21:45:34 UTC] PHP   3. include() C:\wamp\htdocswp\wp-admin\plugins.php:151

 [18-Mar-2015 21:45:34 UTC] PHP   4. WpSecurityAuditLog::GetInstance() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\wp-security-audit-log.php:583

 [18-Mar-2015 21:45:34 UTC] PHP   5. WpSecurityAuditLog->__construct() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\wp-security-audit-log.php:111

 [18-Mar-2015 21:45:34 UTC] PHP   6. WSAL_ViewManager->__construct() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\wp-security-audit-log.php:133

 [18-Mar-2015 21:45:34 UTC] PHP   7. WSAL_ViewManager->AddFromFile() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\ViewManager.php:20

 [18-Mar-2015 21:45:34 UTC] PHP   8. WSAL_ViewManager->AddFromClass() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\ViewManager.php:41

 [18-Mar-2015 21:45:34 UTC] PHP   9. WSAL_Views_Settings->__construct() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\ViewManager.php:49

 [18-Mar-2015 21:45:34 UTC] PHP Fatal error:  Call to a member function CurrentUserCan() on a non-object in C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\Views\Settings.php on line 7

 [18-Mar-2015 21:45:34 UTC] PHP Stack trace:

 [18-Mar-2015 21:45:34 UTC] PHP   1. {main}() C:\wamp\htdocswp\wp-admin\plugins.php:0

 [18-Mar-2015 21:45:34 UTC] PHP   2. plugin_sandbox_scrape() C:\wamp\htdocswp\wp-admin\plugins.php:153

 [18-Mar-2015 21:45:34 UTC] PHP   3. include() C:\wamp\htdocswp\wp-admin\plugins.php:151

 [18-Mar-2015 21:45:34 UTC] PHP   4. WpSecurityAuditLog::GetInstance() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\wp-security-audit-log.php:583

 [18-Mar-2015 21:45:34 UTC] PHP   5. WpSecurityAuditLog->__construct() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\wp-security-audit-log.php:111

 [18-Mar-2015 21:45:34 UTC] PHP   6. WSAL_ViewManager->__construct() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\wp-security-audit-log.php:133

 [18-Mar-2015 21:45:34 UTC] PHP   7. WSAL_ViewManager->AddFromFile() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\ViewManager.php:20

 [18-Mar-2015 21:45:34 UTC] PHP   8. WSAL_ViewManager->AddFromClass() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\ViewManager.php:41

 [18-Mar-2015 21:45:34 UTC] PHP   9. WSAL_Views_Settings->__construct() C:\wamp\htdocswp\wp-content\plugins\wp-security-audit-log\classes\ViewManager.php:49

Database Error when Activating latest version of plugin

Upon activating the latest version of the plugin the following error is generated in debug.log:

 [18-Jan-2015 09:48:17 UTC] WordPress database error Duplicate key name 'site_alert_created' for query ALTER TABLE wp_wsal_occurrences ADD KEY site_alert_created (site_id,alert_id,created_on) made by activate_plugin, do_action('activate_wp-security-audit-log/wp-security-audit-log.php'), call_user_func_array, WpSecurityAuditLog->Install, WSAL_DB_ActiveRecord::InstallAll, WSAL_DB_ActiveRecord->Install, dbDelta

Fix column space in Audit Log Viewer

In a multisite installation the minimum width of the "site" column is too wide and the alerts look crammed, as per the highlighted screenshot.

We should have the width of the site column dynamic with the minimum set to very little.
fix spacing

Issue with Failed Logins Alerts - Alerts 1002 Not Generated when there are 10+ Alert 1003

Branch 1.4.0:

If there are 10+ Alerts with code 1003 (failed logins for non existing users from a specific host), if there are failed logins for existing users from the same host the plugin is not generating Alert 1002. The logic should be as follows:

Plugin detects failed alert
Plugin checks username in failed login
If username exists it generates Alert 1002 and reports username
If username does not exist it generates Alert 1003

In case there are 10+ 1003 alerts the plugin should still keep check the usernames of failed logins from the same host. If the user is non existing, the plugin should ignore the request, as is now. Though if the username exists it should generate or update Alert 1002. If there are 10+ instances of Alert 1002 for that specific username and host then the request should be ignored.

The only situation where the plugin should ignore failed logins from a specific host when there are 10+ 1003 alerts and 10+ 1002 alerts for each existing username on WordPress.

Source IP not reported when Proxy Option is on

The source IP is not being reported when the Proxy option is switched on, even though the reverse proxy is forwarding the IP in the Forwarded_For header:

 X-Forwarded-For: 192.168.2.124:49297

Incorrect alert reported when excluded user creates a new user

Normal scenario: when user "admin" creates a new username "kypri" with the role of "author" the following alert is created:

ID: 4001
User: admin
message: Created a new user kypri with the role of administrator

Though if the "admin" user is excluded from monitoring, rather than no alerts the following alert is being reported:

ID: 4002
User: admin
message: Changed the role of user kypry from to administrator

In such case no alerts should be created. This issue is related to the previous 4002 issue because of the way WordPress works, hence most probably when #41 is fixed this will be fixed as well.

Failed Logins Issue (Specific Alert 1003 issue) with Multisite

In a multisite environment alert 1003 is not "working correctly". This is what is happening:

Setup: 3 websites on a multisite:

site1.multiwp.com
site2.multiwp.com
site3.multiwp.com

There are a number failed logins for a non existing user from host 192.168.2.127 hence Alert 1003 is generated reporting the site name, as per the below screenshot:

image

If failed logins for a non existing user are generated from the same host but on a different site, e.g. site2.multiwp.com the date of the same Alert 1003 is being updated. In the case of multisite we need to keep track of failed logins specifically for each site on the network hence in the above case a new Alert 1003 should have been generated for site2.

New exclude input fields cccept any value / Implement auto complete

The new input fields in the settings, mainly:

Excluded Users
Excluded Roles
Excluded Custom Fields

Such behaviour can potentially lead to a lot of problems. In the case of Excluded Users and Excluded Roles we should ONLY allow existing roles and users. Therefore if the user enters a non existing user or role the following error should show up:

Specified User or Role does not exist.

It should only have an OK button and the user or role should not be added. If possible and does not require a lot of effort we should implement auto complete (there is auto complete in other extensions if I am not mistaken such as the search. Maybe we should check the code and reuse it or create common code to be used by all).

In case of Excluded Custom Fields we should only allow characters that are allowed in custom fields names. Right now I can add characters such as ^ etc. I am checking if there is an official list of characters. Will keep you posted.

Syslog

Is it possible to log all E_CRITICAL notifications to php syslog()?

Site Admins in Multisite Cannot See Own Audit log Viewer

Per design Site administrators on a WordPress multisite should be able to see the audit log for their own site though the plugin menu (Audit Log) is not even being shown when for example the administrator of site 1 logs in.

I rolled back installations to version 1 and this problem persists, hence I presume it is related to some changes WordPress did. Can you please check?

More info on how multisite functionality should be:
http://www.wpwhitesecurity.com/wordpress-plugins/wp-security-audit-log-plugin-features-wordpress-multisite/

Multisite Upgrade to 1.5 not migrating settings

When a 1.4 version of the plugin is upgraded to 1.5 on a multisite, the new options table is created, the 1.4 settings are deleted but not migrated to the new options table. E.g. I had the following options configured in wp_sitemeta table (the table where multisite settings are saved):

wsal-pruning-date 1 month
wsal-pruning-limit-e 1
wsal-pruning-limit 5000
wsal-plugin-viewers
wsal-plugin-editors
wsal-delete-data 1
wsal-dev-options

Considering most of them where default most probably there was no need to migrate them but it would be safer to migrate all wsal* options. Also the wsal-delete-data was not the default yet it was not migrated. After the upgrade there were only the following settings In the wp_wsal_options table:

wsal-pruning-date "1 month"
wsal-pruning-limit-e true
wsal-pruning-limit 5000

Error in ActiveRecord.php file

While replicating a site I've worked on for a guy from Seychelles, I've got this error in the wp-admin, in the plugin's dashboard widget:

PHP Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in \sys-path\wp-content\plugins\wp-security-audit-log\classes\DB\ActiveRecord.php on line 62

Then, when I went to check the wsal plugin page, I got the same error and no other content.

The line in question is this:

$sql .= $key . ' VARCHAR(' . intval($class::$$maxlenght) . ') NOT NULL,' . PHP_EOL;

Problems with Database

@markdelf @carmelopreeostudios

It seems in version 1.5 there are several users which are having problems. While one of them reported that the options table was not created:

https://wordpress.org/support/topic/wp_wsal_options-not-created-with-plugin-update?replies=6

Another one is saying that none of the tables are being created:

https://wordpress.org/support/topic/missing-database-tables-1?replies=9

Another user reported that the options table was not created though he deactivated and activated the plugin again and the table was created.

Considering there are already 3 tickets related to this issue it seems this can be a "generic" problem. Let's created a debug version of the plugin where it creates its own logs (or something similar) and log everything that is happening during activation, especially the database activity. We need to identify why the table is not being created, maybe we are getting a timeout from the SQL or something similar.

Can you please create this debug version so I send it to the customers with the problem?

Problem with Pruning - Prune by number of alerts

If I configure the pruning option to keep up to X number of alerts all alerts are being deleted. Problem reproducible at the moment on wpprohelp.com and can be reproduced on several other websites.

If you switch the pruning to "number of alerts" all alerts are deleted upon pruning. The pruning "by time" works out fine.

Here is also a support ticket which might be related:

https://wordpress.org/support/topic/cant-change-alerts-pruning-option?replies=2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.