algolia / algoliasearch-wordpress

❌🗑🙅‍♂️ Algolia Search plugin for WordPress is no longer supported. Please use our API client guide instead
https://www.algolia.com/doc/integration/wordpress/getting-started/quick-start/
GNU General Public License v2.0
358 stars 114 forks source link

AJAX endpoints should have permission checks. #799

Open petenelson opened 6 years ago

petenelson commented 6 years ago

In the Algolia_Admin class, both the re_index() and push_settings() functions should have a current_user_can() check. As of right now, anyone that can login to WordPress, including the basic Subscriber role, can make AJAX calls to trigger these endpoints.

https://github.com/algolia/algoliasearch-wordpress/blob/master/includes/admin/class-algolia-admin.php#L118