Skip to content

Commit

Permalink
Fixing issue with splitting lines by platform
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher committed Jan 12, 2024
1 parent 903aa3a commit 7bd0e5b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# REST API Guard

Stable tag: 1.0.2
Stable tag: 1.0.4

Requires at least: 6.0

Expand Down
6 changes: 3 additions & 3 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: REST API Guard
* Plugin URI: https://github.com/alleyinteractive/wp-rest-api-guard
* Description: Restrict and control access to the REST API
* Version: 1.0.3
* Version: 1.0.4
* Author: Sean Fisher
* Author URI: https://alley.co/
* Requires at least: 6.0
Expand Down Expand Up @@ -104,7 +104,7 @@ function should_prevent_anonymous_access( WP_REST_Server $server, WP_REST_Reques

if ( ! empty( $allowlist ) ) {
if ( ! is_array( $allowlist ) ) {
$allowlist = explode( "\n", $allowlist );
$allowlist = preg_split( '/\r\n|\r|\n/', $allowlist );
}

foreach ( $allowlist as $allowlist_endpoint ) {
Expand All @@ -127,7 +127,7 @@ function should_prevent_anonymous_access( WP_REST_Server $server, WP_REST_Reques

if ( ! empty( $denylist ) ) {
if ( ! is_array( $denylist ) ) {
$denylist = explode( "\n", $denylist );
$denylist = preg_split( '/\r\n|\r|\n/', $denylist );
}

foreach ( $denylist as $denylist_endpoint ) {
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
=== REST API Guard ===
Stable tag: 1.0.3
Stable tag: 1.0.4
Requires at least: 6.0
Tested up to: 6.3
Requires PHP: 7.4
Expand Down

0 comments on commit 7bd0e5b

Please sign in to comment.