Changeset 1759587
- Timestamp:
- 11/06/2017 05:29:32 PM (8 years ago)
- Location:
- turn-off-rest-api
- Files:
-
- 27 added
- 3 edited
-
assets/screenshot-1.jpg (added)
-
tags/1.0.3 (added)
-
tags/1.0.3/admin (added)
-
tags/1.0.3/admin/admin.php (added)
-
tags/1.0.3/admin/index.php (added)
-
tags/1.0.3/assets (added)
-
tags/1.0.3/assets/css (added)
-
tags/1.0.3/assets/css/style.css (added)
-
tags/1.0.3/assets/index.php (added)
-
tags/1.0.3/assets/js (added)
-
tags/1.0.3/assets/js/script.js (added)
-
tags/1.0.3/lang (added)
-
tags/1.0.3/lang/en_US (added)
-
tags/1.0.3/lang/en_US/tora-en_US.mo (added)
-
tags/1.0.3/lang/en_US/tora-en_US.po (added)
-
tags/1.0.3/lang/index.php (added)
-
tags/1.0.3/license.txt (added)
-
tags/1.0.3/readme.txt (added)
-
tags/1.0.3/turn-off-rest-api.php (added)
-
tags/1.0.3/uninstall.php (added)
-
trunk/admin/admin.php (modified) (1 diff)
-
trunk/admin/index.php (added)
-
trunk/assets/index.php (added)
-
trunk/lang/en_US (added)
-
trunk/lang/en_US/tora-en_US.mo (added)
-
trunk/lang/en_US/tora-en_US.po (added)
-
trunk/lang/index.php (added)
-
trunk/license.txt (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/turn-off-rest-api.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
turn-off-rest-api/trunk/admin/admin.php
r1738196 r1759587 92 92 <?php settings_errors( 'turn-off-rest-api-notices' ); ?> 93 93 <p> 94 <strong>95 <?php _e( 'Unauthorized access to WP REST API endpoints are disabled by default.', 'turn-off-rest-api' ); ?>96 </strong><br />97 <?php _e( 'To restore default functionality and permit an access on REST API endpoints, you may check the box.', 'turn-off-rest-api' ); ?>94 <strong> 95 <?php _e( 'Unauthorized access to WP REST API endpoints are disabled by default.', 'turn-off-rest-api' ); ?> 96 </strong><br /> 97 <?php _e( 'To restore default functionality and permit an access on REST API endpoints, you may check the box.', 'turn-off-rest-api' ); ?> 98 98 </p> 99 99 100 100 <form method="post" action="" id="tora-form"> 101 101 <?php wp_nonce_field( 'turn_off_rest_api_admin_nonce' ); ?> 102 <div id="tora-checkbox-list"><?php turn_off_rest_api_list_route_checkboxes(); ?></div>102 <div id="tora-checkbox-list"><?php turn_off_rest_api_list_route_checkboxes(); ?></div> 103 103 104 <?php $reset_message = __( "Are you sure you want to restore default settings?", 'turn-off-rest-api' ); ?>105 <div class="tora-action-box__row">106 <?php submit_button( 'Save', 'primary', 'submit', false ); ?>107 <?php submit_button( 'Reset', 'secondary', 'reset', false, array( 'onclick' => "return confirm('{$reset_message}');" ) ); ?>108 </div>104 <?php $reset_message = __( "Are you sure you want to restore default settings?", 'turn-off-rest-api' ); ?> 105 <div class="tora-action-box__row"> 106 <?php submit_button( 'Save', 'primary', 'submit', false ); ?> 107 <?php submit_button( 'Reset', 'secondary', 'reset', false, array( 'onclick' => "return confirm('{$reset_message}');" ) ); ?> 108 </div> 109 109 </form> 110 110 </div> -
turn-off-rest-api/trunk/readme.txt
r1738190 r1759587 1 1 === Turn Off REST API === 2 2 Contributors: ksym04 3 Tags: security, api, json, REST, admin, turn off, disable, kill3 Tags: disable rest api, json, rest, api, admin 4 4 Requires at least: 4.7 5 Tested up to: 4.8.2 6 Stable tag: 1.0.2 7 License: GPLv2 or later 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html 5 Tested up to: 4.8.3 6 Stable tag: 1.0.3 7 License: GPL2+ 8 License URI: license.txt 9 10 This plugin prevents unauthorized requests from using the WP REST API. 11 12 == Description == 9 13 10 14 Turn off JSON REST API on your website to anonymous users and prevent unauthorized requests from using the REST API to get information from your website. 11 12 == Description ==13 15 14 16 Since the release of WordPress 4.0 came out, there have been a lot of hackers exploiting the vulnerabilities of the REST API. By installing this plugin, you will effectively prevent and disable the use of REST API from unauthorized users and protect the information on your website from being accessible. If someone tries to access the REST API on your site, the plugin will return an authentication error on the API endpoints, for any unauthorized users trying to access it. … … 16 18 While WordPress REST API vulnerability exploits continue this plugin effectively prevent and disable the used of REST API from accessing information from your website, this plugin return authentication error and disable all endpoints for any user not logged in on your website. 17 19 20 = Language Support = 21 22 * English (en_US) 23 18 24 == Installation == 19 25 20 26 1. Upload the `turn-off-rest-api` directory to the `/wp-content/plugins/` directory via FTP 21 27 2. Activate the plugin through the 'Plugins' menu in WordPress 22 3. To test kindly logout and please go to http://[your_website_url].com/wp-json and check if REST API will return an error that reads 'Only authenticated users are allowed an access on REST API' 28 3. Enjoy 29 30 == Frequently Asked Questions == 31 32 = How may I know if the plugin is working and my WP REST API is secured? = 33 34 To test kindly log out and please go to http://[your_website_url].com/wp-json and check if REST API will return an error that reads 'Only authenticated users are allowed an access on REST API' 35 36 == Screenshots == 37 38 1. Test if the wp-json is secured from unauthorized access. 23 39 24 40 == Changelog == 25 41 42 = 1.0.3 = 43 * Added en_US language file 44 * Added license file 45 * Minor code clean up 46 26 47 = 1.0.2 = 27 [09/27/2017]28 48 * Added endpoints admin page 29 49 * Minor improvements 30 50 31 51 = 1.0.1 = 32 [03/31/2017]33 52 * Minor improvements 34 53 35 54 = 1.0.1 = 36 [03/29/2017]37 55 * Optimized filter implementation 38 56 39 57 = 1.0.0 = 40 [03/23/2017]41 58 * Initial Release -
turn-off-rest-api/trunk/turn-off-rest-api.php
r1738196 r1759587 2 2 /* 3 3 Plugin Name: Turn Off REST API 4 Plugin URI: http://w ordpress.dopethemes.com/turn-off-rest-api/5 Description: T urn off JSON REST API on your website to anonymous users and prevent unauthorized requests from using theREST API.4 Plugin URI: http://www.dopethemes.com/downloads/turn-off-rest-api/ 5 Description: This plugin prevents unauthorized requests from using the WP REST API. 6 6 Author: DopeThemes 7 7 Author URI: http://www.dopethemes.com/ 8 8 Text Domain: turn-off-rest-api 9 Version: 1.0. 210 License: GPL v2 or later11 License URI: http://www.gnu.org/licenses/gpl-2.0.html9 Version: 1.0.3 10 License: GPL2+ 11 License URI: license.txt 12 12 Domain Path: /lang 13 13 */ 14 14 15 /* 16 Copyright DopeThemes 17 18 This program is free software; you can redistribute it and/or modify 19 it under the terms of the GNU General Public License as published by 20 the Free Software Foundation; either version 2 of the License, or 21 (at your option) any later version. 22 23 This program is distributed in the hope that it will be useful, 24 but WITHOUT ANY WARRANTY; without even the implied warranty of 25 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 GNU General Public License for more details. 27 28 You should have received a copy of the GNU General Public License 29 along with this program; if not, write to the Free Software 30 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 31 */ 32 15 33 if( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 16 34 … … 59 77 // basic 60 78 'name' => __( 'Turn Off REST API', 'turn-off-rest-api' ), 61 'version' => '1.0. 2',79 'version' => '1.0.3', 62 80 63 81 // parameters … … 356 374 global $turn_off_rest_api; 357 375 358 if( ! isset($turn_off_rest_api) ) {376 if( ! isset($turn_off_rest_api) ) { 359 377 360 378 $turn_off_rest_api = new turn_off_rest_api();
Note: See TracChangeset
for help on using the changeset viewer.