Plugin Directory

Changeset 1759587


Ignore:
Timestamp:
11/06/2017 05:29:32 PM (8 years ago)
Author:
ksym04
Message:

Version 1.0.3

Location:
turn-off-rest-api
Files:
27 added
3 edited

Legend:

Unmodified
Added
Removed
  • turn-off-rest-api/trunk/admin/admin.php

    r1738196 r1759587  
    9292    <?php settings_errors( 'turn-off-rest-api-notices' ); ?>
    9393    <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' ); ?>
    9898    </p>
    9999
    100100    <form method="post" action="" id="tora-form">
    101101    <?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>
    103103
    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>
    109109    </form>
    110110</div>
  • turn-off-rest-api/trunk/readme.txt

    r1738190 r1759587  
    11=== Turn Off REST API ===
    22Contributors: ksym04
    3 Tags: security, api, json, REST, admin, turn off, disable, kill
     3Tags: disable rest api, json, rest, api, admin
    44Requires 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
     5Tested up to: 4.8.3
     6Stable tag: 1.0.3
     7License: GPL2+
     8License URI: license.txt
     9
     10This plugin prevents unauthorized requests from using the WP REST API.
     11
     12== Description ==
    913
    1014Turn 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 ==
    1315
    1416Since 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.
     
    1618While 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.
    1719
     20= Language Support =
     21
     22* English (en_US)
     23
    1824== Installation ==
    1925
    20261. Upload the `turn-off-rest-api` directory to the `/wp-content/plugins/` directory via FTP
    21272. 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'
     283. 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
     34To 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
     381. Test if the wp-json is secured from unauthorized access.
    2339
    2440== Changelog ==
    2541
     42= 1.0.3 =
     43* Added en_US language file
     44* Added license file
     45* Minor code clean up
     46
    2647= 1.0.2 =
    27 [09/27/2017]
    2848* Added endpoints admin page
    2949* Minor improvements
    3050
    3151= 1.0.1 =
    32 [03/31/2017]
    3352* Minor improvements
    3453
    3554= 1.0.1 =
    36 [03/29/2017]
    3755* Optimized filter implementation
    3856
    3957= 1.0.0 =
    40 [03/23/2017]
    4158* Initial Release
  • turn-off-rest-api/trunk/turn-off-rest-api.php

    r1738196 r1759587  
    22/*
    33Plugin Name: Turn Off REST API
    4 Plugin URI: http://wordpress.dopethemes.com/turn-off-rest-api/
    5 Description: Turn off JSON REST API on your website to anonymous users and prevent unauthorized requests from using the REST API.
     4Plugin URI: http://www.dopethemes.com/downloads/turn-off-rest-api/
     5Description: This plugin prevents unauthorized requests from using the WP REST API.
    66Author: DopeThemes
    77Author URI: http://www.dopethemes.com/
    88Text Domain: turn-off-rest-api
    9 Version: 1.0.2
    10 License: GPLv2 or later
    11 License URI: http://www.gnu.org/licenses/gpl-2.0.html
     9Version: 1.0.3
     10License: GPL2+
     11License URI: license.txt
    1212Domain Path: /lang
    1313*/
    1414
     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
    1533if( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    1634
     
    5977            // basic
    6078            'name'      => __( 'Turn Off REST API', 'turn-off-rest-api' ),
    61             'version'   => '1.0.2',
     79            'version'   => '1.0.3',
    6280
    6381            // parameters
     
    356374    global $turn_off_rest_api;
    357375
    358     if( !isset($turn_off_rest_api) ) {
     376    if( ! isset($turn_off_rest_api) ) {
    359377
    360378        $turn_off_rest_api = new turn_off_rest_api();
Note: See TracChangeset for help on using the changeset viewer.