Changeset 3042772
- Timestamp:
- 02/28/2024 07:26:48 PM (5 months ago)
- Location:
- rest-api-guard
- Files:
-
- 10 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
rest-api-guard/tags/1.3.0/CHANGELOG.md
r3042771 r3042772 3 3 All notable changes to `wp-rest-guard` will be documented in this file. 4 4 5 ## v1. 2.1 - 2024-02-265 ## v1. 6 6 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. 8 9 9 10 ## v1.2.0 - 2024-02-22 -
rest-api-guard/tags/1.3.0/README.md
r3042771 r3042772 1 1 # REST API Guard 2 2 3 Stable tag: 1. 2.13 Stable tag: 1. 4 4 5 5 Requires at least: 6.0 -
rest-api-guard/tags/1.3.0/plugin.php
r3042771 r3042772 4 4 * Plugin URI: https://github.com/alleyinteractive/wp-rest-api-guard 5 5 * Description: Restrict and control access to the REST API 6 * Version: 1. 2.06 * Version: 1..0 7 7 * Author: Sean Fisher 8 * Author URI: https://alley.co /8 * Author URI: https://alley.co/ 9 9 * Requires at least: 6.0 10 10 * Tested up to: 6.3 … … 58 58 if ( ! is_array( $settings ) ) { 59 59 $settings = []; 60 61 62 63 64 65 66 67 68 69 70 71 60 72 } 61 73 … … 150 162 * Prevent access to the root of the REST API. 151 163 * 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 ) ) { 155 168 return true; 156 169 } … … 172 185 * Prevent access to the /wp/v2/users endpoints by default. 173 186 * 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 ) ) { 177 191 return true; 178 192 } -
rest-api-guard/tags/1.3.0/readme.txt
r3042771 r3042772 1 1 === REST API Guard === 2 Stable tag: 1. 2.12 Stable tag: 1. 3 3 Requires at least: 6.0 4 4 Tested up to: 6.3 -
rest-api-guard/tags/1.3.0/settings.php
r3040295 r3042772 142 142 'filter' => 'rest_api_guard_allow_user_access', 143 143 'id' => 'allow_user_access', 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 144 159 'type' => 'checkbox', 145 160 ], … … 233 248 'allow_namespace_access' => ! empty( $input['allow_namespace_access'] ), 234 249 'allow_user_access' => ! empty( $input['allow_user_access'] ), 250 235 251 'anonymous_requests_allowlist' => ! empty( $input['anonymous_requests_allowlist'] ) ? sanitize_textarea_field( $input['anonymous_requests_allowlist'] ) : '', 236 252 'anonymous_requests_denylist' => ! empty( $input['anonymous_requests_denylist'] ) ? sanitize_textarea_field( $input['anonymous_requests_denylist'] ) : '', -
rest-api-guard/trunk/CHANGELOG.md
r3042771 r3042772 3 3 All notable changes to `wp-rest-guard` will be documented in this file. 4 4 5 ## v1. 2.1 - 2024-02-265 ## v1. 6 6 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. 8 9 9 10 ## v1.2.0 - 2024-02-22 -
rest-api-guard/trunk/README.md
r3042771 r3042772 1 1 # REST API Guard 2 2 3 Stable tag: 1. 2.13 Stable tag: 1. 4 4 5 5 Requires at least: 6.0 -
rest-api-guard/trunk/plugin.php
r3042771 r3042772 4 4 * Plugin URI: https://github.com/alleyinteractive/wp-rest-api-guard 5 5 * Description: Restrict and control access to the REST API 6 * Version: 1. 2.06 * Version: 1..0 7 7 * Author: Sean Fisher 8 * Author URI: https://alley.co /8 * Author URI: https://alley.co/ 9 9 * Requires at least: 6.0 10 10 * Tested up to: 6.3 … … 58 58 if ( ! is_array( $settings ) ) { 59 59 $settings = []; 60 61 62 63 64 65 66 67 68 69 70 71 60 72 } 61 73 … … 150 162 * Prevent access to the root of the REST API. 151 163 * 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 ) ) { 155 168 return true; 156 169 } … … 172 185 * Prevent access to the /wp/v2/users endpoints by default. 173 186 * 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 ) ) { 177 191 return true; 178 192 } -
rest-api-guard/trunk/readme.txt
r3042771 r3042772 1 1 === REST API Guard === 2 Stable tag: 1. 2.12 Stable tag: 1. 3 3 Requires at least: 6.0 4 4 Tested up to: 6.3 -
rest-api-guard/trunk/settings.php
r3040295 r3042772 142 142 'filter' => 'rest_api_guard_allow_user_access', 143 143 'id' => 'allow_user_access', 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 144 159 'type' => 'checkbox', 145 160 ], … … 233 248 'allow_namespace_access' => ! empty( $input['allow_namespace_access'] ), 234 249 'allow_user_access' => ! empty( $input['allow_user_access'] ), 250 235 251 'anonymous_requests_allowlist' => ! empty( $input['anonymous_requests_allowlist'] ) ? sanitize_textarea_field( $input['anonymous_requests_allowlist'] ) : '', 236 252 '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.