Plugin Directory

Changeset 3042772

Timestamp:
02/28/2024 07:26:48 PM (5 months ago)
Author:
sean212
Message:

Update to version 1.3.0 from GitHub

Location:
rest-api-guard
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • rest-api-guard/tags/1.3.0/CHANGELOG.md

    r3042771 r3042772  
    33All notable changes to `wp-rest-guard` will be documented in this file.
    44
    5 ## v1.2.1 - 2024-02-26
     5## v1.
    66
    7 - Allow the claims to be added to added to a generated JWT via filter.
     7- Allow the claims to be added to a generated JWT via filter.
     8- Don't check `OPTIONS` requests by default.
    89
    910## v1.2.0 - 2024-02-22
  • rest-api-guard/tags/1.3.0/README.md

    r3042771 r3042772  
    11# REST API Guard
    22
    3 Stable tag: 1.2.1
     3Stable tag: 1.
    44
    55Requires at least: 6.0
  • rest-api-guard/tags/1.3.0/plugin.php

    r3042771 r3042772  
    44 * Plugin URI: https://github.com/alleyinteractive/wp-rest-api-guard
    55 * Description: Restrict and control access to the REST API
    6  * Version: 1.2.0
     6 * Version: 1..0
    77 * Author: Sean Fisher
    8  * Author URI: https://alley.co/
     8 * Author URI: https://alley.co/
    99 * Requires at least: 6.0
    1010 * Tested up to: 6.3
     
    5858    if ( ! is_array( $settings ) ) {
    5959        $settings = [];
     60
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
    6072    }
    6173
     
    150162     * Prevent access to the root of the REST API.
    151163     *
    152      * @param bool $prevent Whether to prevent anonymous access, default false.
    153      */
    154     if ( '/' === $endpoint && false === apply_filters( 'rest_api_guard_allow_index_access', $settings['allow_index_access'] ?? false ) ) {
     164     * @param bool   $prevent Whether to allow anonymous access to the REST API index. Default false.
     165     * @param string $endpoint The endpoint of the request.
     166     */
     167    if ( '/' === $endpoint && false === apply_filters( 'rest_api_guard_allow_index_access', $settings['allow_index_access'] ?? false, $endpoint ) ) {
    155168        return true;
    156169    }
     
    172185     * Prevent access to the /wp/v2/users endpoints by default.
    173186     *
    174      * @param bool $pre Whether to prevent access to the /wp/v2/users endpoints.
    175      */
    176     if ( preg_match( '#^/wp/v\d+/users($|/)#', $endpoint ) && false === apply_filters( 'rest_api_guard_allow_user_access', $settings['allow_user_access'] ?? false ) ) {
     187     * @param bool   $pre Whether to allow access to the /wp/v2/users endpoints.
     188     * @param string $endpoint The endpoint of the request.
     189     */
     190    if ( preg_match( '#^/wp/v\d+/users($|/)#', $endpoint ) && false === apply_filters( 'rest_api_guard_allow_user_access', $settings['allow_user_access'] ?? false, $endpoint ) ) {
    177191        return true;
    178192    }
  • rest-api-guard/tags/1.3.0/readme.txt

    r3042771 r3042772  
    11=== REST API Guard ===
    2 Stable tag: 1.2.1
     2Stable tag: 1.
    33Requires at least: 6.0
    44Tested up to: 6.3
  • rest-api-guard/tags/1.3.0/settings.php

    r3040295 r3042772  
    142142            'filter'      => 'rest_api_guard_allow_user_access',
    143143            'id'          => 'allow_user_access',
     144
     145
     146
     147
     148
     149
     150
     151
     152
     153
     154
     155
     156
     157
     158
    144159            'type'        => 'checkbox',
    145160        ],
     
    233248        'allow_namespace_access'       => ! empty( $input['allow_namespace_access'] ),
    234249        'allow_user_access'            => ! empty( $input['allow_user_access'] ),
     250
    235251        'anonymous_requests_allowlist' => ! empty( $input['anonymous_requests_allowlist'] ) ? sanitize_textarea_field( $input['anonymous_requests_allowlist'] ) : '',
    236252        'anonymous_requests_denylist'  => ! empty( $input['anonymous_requests_denylist'] ) ? sanitize_textarea_field( $input['anonymous_requests_denylist'] ) : '',
  • rest-api-guard/trunk/CHANGELOG.md

    r3042771 r3042772  
    33All notable changes to `wp-rest-guard` will be documented in this file.
    44
    5 ## v1.2.1 - 2024-02-26
     5## v1.
    66
    7 - Allow the claims to be added to added to a generated JWT via filter.
     7- Allow the claims to be added to a generated JWT via filter.
     8- Don't check `OPTIONS` requests by default.
    89
    910## v1.2.0 - 2024-02-22
  • rest-api-guard/trunk/README.md

    r3042771 r3042772  
    11# REST API Guard
    22
    3 Stable tag: 1.2.1
     3Stable tag: 1.
    44
    55Requires at least: 6.0
  • rest-api-guard/trunk/plugin.php

    r3042771 r3042772  
    44 * Plugin URI: https://github.com/alleyinteractive/wp-rest-api-guard
    55 * Description: Restrict and control access to the REST API
    6  * Version: 1.2.0
     6 * Version: 1..0
    77 * Author: Sean Fisher
    8  * Author URI: https://alley.co/
     8 * Author URI: https://alley.co/
    99 * Requires at least: 6.0
    1010 * Tested up to: 6.3
     
    5858    if ( ! is_array( $settings ) ) {
    5959        $settings = [];
     60
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
    6072    }
    6173
     
    150162     * Prevent access to the root of the REST API.
    151163     *
    152      * @param bool $prevent Whether to prevent anonymous access, default false.
    153      */
    154     if ( '/' === $endpoint && false === apply_filters( 'rest_api_guard_allow_index_access', $settings['allow_index_access'] ?? false ) ) {
     164     * @param bool   $prevent Whether to allow anonymous access to the REST API index. Default false.
     165     * @param string $endpoint The endpoint of the request.
     166     */
     167    if ( '/' === $endpoint && false === apply_filters( 'rest_api_guard_allow_index_access', $settings['allow_index_access'] ?? false, $endpoint ) ) {
    155168        return true;
    156169    }
     
    172185     * Prevent access to the /wp/v2/users endpoints by default.
    173186     *
    174      * @param bool $pre Whether to prevent access to the /wp/v2/users endpoints.
    175      */
    176     if ( preg_match( '#^/wp/v\d+/users($|/)#', $endpoint ) && false === apply_filters( 'rest_api_guard_allow_user_access', $settings['allow_user_access'] ?? false ) ) {
     187     * @param bool   $pre Whether to allow access to the /wp/v2/users endpoints.
     188     * @param string $endpoint The endpoint of the request.
     189     */
     190    if ( preg_match( '#^/wp/v\d+/users($|/)#', $endpoint ) && false === apply_filters( 'rest_api_guard_allow_user_access', $settings['allow_user_access'] ?? false, $endpoint ) ) {
    177191        return true;
    178192    }
  • rest-api-guard/trunk/readme.txt

    r3042771 r3042772  
    11=== REST API Guard ===
    2 Stable tag: 1.2.1
     2Stable tag: 1.
    33Requires at least: 6.0
    44Tested up to: 6.3
  • rest-api-guard/trunk/settings.php

    r3040295 r3042772  
    142142            'filter'      => 'rest_api_guard_allow_user_access',
    143143            'id'          => 'allow_user_access',
     144
     145
     146
     147
     148
     149
     150
     151
     152
     153
     154
     155
     156
     157
     158
    144159            'type'        => 'checkbox',
    145160        ],
     
    233248        'allow_namespace_access'       => ! empty( $input['allow_namespace_access'] ),
    234249        'allow_user_access'            => ! empty( $input['allow_user_access'] ),
     250
    235251        'anonymous_requests_allowlist' => ! empty( $input['anonymous_requests_allowlist'] ) ? sanitize_textarea_field( $input['anonymous_requests_allowlist'] ) : '',
    236252        'anonymous_requests_denylist'  => ! empty( $input['anonymous_requests_denylist'] ) ? sanitize_textarea_field( $input['anonymous_requests_denylist'] ) : '',
Note: See TracChangeset for help on using the changeset viewer.