From 33fbb73b4215f80d2a8d9519061b6a0269cccf3a Mon Sep 17 00:00:00 2001 From: Shirai Kuroko Date: Fri, 28 May 2021 07:43:50 +0800 Subject: [PATCH 1/3] some initial draft that disables REST API? --- makeservices/easywp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/makeservices/easywp b/makeservices/easywp index 6a343b0..4815bd8 100755 --- a/makeservices/easywp +++ b/makeservices/easywp @@ -69,4 +69,30 @@ wp core download wp config create --dbname="$user" --dbuser="$user" --dbpass="$sqlpass" --dbhost=mysql --dbcharset=utf8mb4 # Somehow 644 is the default... See https://core.trac.wordpress.org/ticket/37264 chmod 600 "$webroot/wp-config.php" -echo "WordPress install successful. Go to https://www.ocf.berkeley.edu/~$user to finish the setup process." + +# This is the real install +echo "WordPress configuration creation successful. Setting it up..." + +read -rp 'Enter your desired site title. (Default: newsite)' sitetitle +if [ -z "$sitetitle"]; then + sitetitle="newsite" +fi +read -rp 'Enter your desired admin username. (Default: admin)' adminname +if [ -z "$adminname"]; then + adminname="admin" +fi + +echo "You admin e-mail will be '$(whoami)@ocf.berkeley.edu', the confirmation e-mail will not be sent to you." +echo "WP-CLI will install wordpress for you. If you wish, enter your desired admin password and press enter; if you want one to be randomly generated for you, press enter." +# Use --prompt so that password is not left in ~/.bash_history +wp core install --admin_user="$user" --admin_email="$(whoami)@ocf.berkeley.edu" --skip-email --title=$sitetitle --url="https://www.ocf.berkeley.edu/~$user/" --prompt=admin_password +# As we had `set -e`, installation must be complete as otherwise the script will end. If it is incomplete, people will still know as this step is verbose. + +echo "Campus web security regulations require us to disable unauthenticated REST API. We will install a WordPress plug-in to do that. + You may use other plug-ins that achieve the same thing, you may also disable or remove it afterwards, but it is your responsibility + to ensure your site complies with regulations. Failure to do so may result in your account being suspended." +wp plugin install disable-json-api --activate + +# Change settings, but seems like it does not work! +SETTINGS='a:3:{s:7:"version";s:3:"1.6";s:13:"default_allow";b:1;s:5:"roles";a:5:{s:4:"none";a:2:{s:13:"default_allow";b:0;s:10:"allow_list";a:62:{s:1:"/";b:0;s:9:"/batch/v1";b:0;s:11:"/oembed/1.0";b:0;s:17:"/oembed/1.0/embed";b:0;s:17:"/oembed/1.0/proxy";b:0;s:6:"/wp/v2";b:0;s:12:"/wp/v2/posts";b:0;s:32:"/wp/v2/posts/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/posts/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/posts/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/pages";b:0;s:32:"/wp/v2/pages/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/pages/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/pages/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/media";b:0;s:32:"/wp/v2/media/(?P<id>[\d]+)";b:0;s:45:"/wp/v2/media/(?P<id>[\d]+)/post-process";b:0;s:37:"/wp/v2/media/(?P<id>[\d]+)/edit";b:0;s:13:"/wp/v2/blocks";b:0;s:33:"/wp/v2/blocks/(?P<id>[\d]+)";b:0;s:43:"/wp/v2/blocks/(?P<id>[\d]+)/autosaves";b:0;s:67:"/wp/v2/blocks/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/types";b:0;s:35:"/wp/v2/types/(?P<type>[\w-]+)";b:0;s:15:"/wp/v2/statuses";b:0;s:40:"/wp/v2/statuses/(?P<status>[\w-]+)";b:0;s:17:"/wp/v2/taxonomies";b:0;s:44:"/wp/v2/taxonomies/(?P<taxonomy>[\w-]+)";b:0;s:17:"/wp/v2/categories";b:0;s:37:"/wp/v2/categories/(?P<id>[\d]+)";b:0;s:11:"/wp/v2/tags";b:0;s:31:"/wp/v2/tags/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/users";b:0;s:32:"/wp/v2/users/(?P<id>[\d]+)";b:0;s:15:"/wp/v2/users/me";b:0;s:66:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords";b:0;s:77:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/introspect";b:0;s:90:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/(?P<uuid>[\w\-]+)";b:0;s:15:"/wp/v2/comments";b:0;s:35:"/wp/v2/comments/(?P<id>[\d]+)";b:0;s:13:"/wp/v2/search";b:0;s:59:"/wp/v2/block-renderer/(?P<name>[a-z0-9-]+/[a-z0-9-]+)";b:0;s:18:"/wp/v2/block-types";b:0;s:54:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)";b:0;s:85:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)/(?P<name>[a-zA-Z0-9_-]+)";b:0;s:15:"/wp/v2/settings";b:0;s:13:"/wp/v2/themes";b:0;s:42:"/wp/v2/themes/(?P<stylesheet>[\w-]+)";b:0;s:14:"/wp/v2/plugins";b:0;s:54:"/wp/v2/plugins/(?P<plugin>[^.\/]+(?:\/[^.\/]+)?)";b:0;s:29:"/wp/v2/block-directory/search";b:0;s:18:"/wp-site-health/v1";b:0;s:43:"/wp-site-health/v1/tests/background-updates";b:0;s:42:"/wp-site-health/v1/tests/loopback-requests";b:0;s:37:"/wp-site-health/v1/tests/https-status";b:0;s:45:"/wp-site-health/v1/tests/dotorg-communication";b:0;s:45:"/wp-site-health/v1/tests/authorization-header";b:0;s:34:"/wp-site-health/v1/directory-sizes";b:0;}}s:10:"subscriber";a:2:{s:13:"default_allow";b:0;s:10:"allow_list";a:62:{s:1:"/";b:0;s:9:"/batch/v1";b:0;s:11:"/oembed/1.0";b:0;s:17:"/oembed/1.0/embed";b:0;s:17:"/oembed/1.0/proxy";b:0;s:6:"/wp/v2";b:0;s:12:"/wp/v2/posts";b:0;s:32:"/wp/v2/posts/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/posts/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/posts/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/pages";b:0;s:32:"/wp/v2/pages/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/pages/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/pages/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/media";b:0;s:32:"/wp/v2/media/(?P<id>[\d]+)";b:0;s:45:"/wp/v2/media/(?P<id>[\d]+)/post-process";b:0;s:37:"/wp/v2/media/(?P<id>[\d]+)/edit";b:0;s:13:"/wp/v2/blocks";b:0;s:33:"/wp/v2/blocks/(?P<id>[\d]+)";b:0;s:43:"/wp/v2/blocks/(?P<id>[\d]+)/autosaves";b:0;s:67:"/wp/v2/blocks/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/types";b:0;s:35:"/wp/v2/types/(?P<type>[\w-]+)";b:0;s:15:"/wp/v2/statuses";b:0;s:40:"/wp/v2/statuses/(?P<status>[\w-]+)";b:0;s:17:"/wp/v2/taxonomies";b:0;s:44:"/wp/v2/taxonomies/(?P<taxonomy>[\w-]+)";b:0;s:17:"/wp/v2/categories";b:0;s:37:"/wp/v2/categories/(?P<id>[\d]+)";b:0;s:11:"/wp/v2/tags";b:0;s:31:"/wp/v2/tags/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/users";b:0;s:32:"/wp/v2/users/(?P<id>[\d]+)";b:0;s:15:"/wp/v2/users/me";b:0;s:66:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords";b:0;s:77:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/introspect";b:0;s:90:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/(?P<uuid>[\w\-]+)";b:0;s:15:"/wp/v2/comments";b:0;s:35:"/wp/v2/comments/(?P<id>[\d]+)";b:0;s:13:"/wp/v2/search";b:0;s:59:"/wp/v2/block-renderer/(?P<name>[a-z0-9-]+/[a-z0-9-]+)";b:0;s:18:"/wp/v2/block-types";b:0;s:54:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)";b:0;s:85:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)/(?P<name>[a-zA-Z0-9_-]+)";b:0;s:15:"/wp/v2/settings";b:0;s:13:"/wp/v2/themes";b:0;s:42:"/wp/v2/themes/(?P<stylesheet>[\w-]+)";b:0;s:14:"/wp/v2/plugins";b:0;s:54:"/wp/v2/plugins/(?P<plugin>[^.\/]+(?:\/[^.\/]+)?)";b:0;s:29:"/wp/v2/block-directory/search";b:0;s:18:"/wp-site-health/v1";b:0;s:43:"/wp-site-health/v1/tests/background-updates";b:0;s:42:"/wp-site-health/v1/tests/loopback-requests";b:0;s:37:"/wp-site-health/v1/tests/https-status";b:0;s:45:"/wp-site-health/v1/tests/dotorg-communication";b:0;s:45:"/wp-site-health/v1/tests/authorization-header";b:0;s:34:"/wp-site-health/v1/directory-sizes";b:0;}}s:11:"contributor";a:2:{s:13:"default_allow";b:0;s:10:"allow_list";a:62:{s:1:"/";b:0;s:9:"/batch/v1";b:0;s:11:"/oembed/1.0";b:0;s:17:"/oembed/1.0/embed";b:0;s:17:"/oembed/1.0/proxy";b:0;s:6:"/wp/v2";b:0;s:12:"/wp/v2/posts";b:0;s:32:"/wp/v2/posts/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/posts/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/posts/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/pages";b:0;s:32:"/wp/v2/pages/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/pages/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/pages/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/media";b:0;s:32:"/wp/v2/media/(?P<id>[\d]+)";b:0;s:45:"/wp/v2/media/(?P<id>[\d]+)/post-process";b:0;s:37:"/wp/v2/media/(?P<id>[\d]+)/edit";b:0;s:13:"/wp/v2/blocks";b:0;s:33:"/wp/v2/blocks/(?P<id>[\d]+)";b:0;s:43:"/wp/v2/blocks/(?P<id>[\d]+)/autosaves";b:0;s:67:"/wp/v2/blocks/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/types";b:0;s:35:"/wp/v2/types/(?P<type>[\w-]+)";b:0;s:15:"/wp/v2/statuses";b:0;s:40:"/wp/v2/statuses/(?P<status>[\w-]+)";b:0;s:17:"/wp/v2/taxonomies";b:0;s:44:"/wp/v2/taxonomies/(?P<taxonomy>[\w-]+)";b:0;s:17:"/wp/v2/categories";b:0;s:37:"/wp/v2/categories/(?P<id>[\d]+)";b:0;s:11:"/wp/v2/tags";b:0;s:31:"/wp/v2/tags/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/users";b:0;s:32:"/wp/v2/users/(?P<id>[\d]+)";b:0;s:15:"/wp/v2/users/me";b:0;s:66:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords";b:0;s:77:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/introspect";b:0;s:90:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/(?P<uuid>[\w\-]+)";b:0;s:15:"/wp/v2/comments";b:0;s:35:"/wp/v2/comments/(?P<id>[\d]+)";b:0;s:13:"/wp/v2/search";b:0;s:59:"/wp/v2/block-renderer/(?P<name>[a-z0-9-]+/[a-z0-9-]+)";b:0;s:18:"/wp/v2/block-types";b:0;s:54:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)";b:0;s:85:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)/(?P<name>[a-zA-Z0-9_-]+)";b:0;s:15:"/wp/v2/settings";b:0;s:13:"/wp/v2/themes";b:0;s:42:"/wp/v2/themes/(?P<stylesheet>[\w-]+)";b:0;s:14:"/wp/v2/plugins";b:0;s:54:"/wp/v2/plugins/(?P<plugin>[^.\/]+(?:\/[^.\/]+)?)";b:0;s:29:"/wp/v2/block-directory/search";b:0;s:18:"/wp-site-health/v1";b:0;s:43:"/wp-site-health/v1/tests/background-updates";b:0;s:42:"/wp-site-health/v1/tests/loopback-requests";b:0;s:37:"/wp-site-health/v1/tests/https-status";b:0;s:45:"/wp-site-health/v1/tests/dotorg-communication";b:0;s:45:"/wp-site-health/v1/tests/authorization-header";b:0;s:34:"/wp-site-health/v1/directory-sizes";b:0;}}s:6:"author";a:2:{s:13:"default_allow";b:0;s:10:"allow_list";a:62:{s:1:"/";b:0;s:9:"/batch/v1";b:0;s:11:"/oembed/1.0";b:0;s:17:"/oembed/1.0/embed";b:0;s:17:"/oembed/1.0/proxy";b:0;s:6:"/wp/v2";b:0;s:12:"/wp/v2/posts";b:0;s:32:"/wp/v2/posts/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/posts/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/posts/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/pages";b:0;s:32:"/wp/v2/pages/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/pages/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/pages/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/media";b:0;s:32:"/wp/v2/media/(?P<id>[\d]+)";b:0;s:45:"/wp/v2/media/(?P<id>[\d]+)/post-process";b:0;s:37:"/wp/v2/media/(?P<id>[\d]+)/edit";b:0;s:13:"/wp/v2/blocks";b:0;s:33:"/wp/v2/blocks/(?P<id>[\d]+)";b:0;s:43:"/wp/v2/blocks/(?P<id>[\d]+)/autosaves";b:0;s:67:"/wp/v2/blocks/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/types";b:0;s:35:"/wp/v2/types/(?P<type>[\w-]+)";b:0;s:15:"/wp/v2/statuses";b:0;s:40:"/wp/v2/statuses/(?P<status>[\w-]+)";b:0;s:17:"/wp/v2/taxonomies";b:0;s:44:"/wp/v2/taxonomies/(?P<taxonomy>[\w-]+)";b:0;s:17:"/wp/v2/categories";b:0;s:37:"/wp/v2/categories/(?P<id>[\d]+)";b:0;s:11:"/wp/v2/tags";b:0;s:31:"/wp/v2/tags/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/users";b:0;s:32:"/wp/v2/users/(?P<id>[\d]+)";b:0;s:15:"/wp/v2/users/me";b:0;s:66:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords";b:0;s:77:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/introspect";b:0;s:90:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/(?P<uuid>[\w\-]+)";b:0;s:15:"/wp/v2/comments";b:0;s:35:"/wp/v2/comments/(?P<id>[\d]+)";b:0;s:13:"/wp/v2/search";b:0;s:59:"/wp/v2/block-renderer/(?P<name>[a-z0-9-]+/[a-z0-9-]+)";b:0;s:18:"/wp/v2/block-types";b:0;s:54:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)";b:0;s:85:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)/(?P<name>[a-zA-Z0-9_-]+)";b:0;s:15:"/wp/v2/settings";b:0;s:13:"/wp/v2/themes";b:0;s:42:"/wp/v2/themes/(?P<stylesheet>[\w-]+)";b:0;s:14:"/wp/v2/plugins";b:0;s:54:"/wp/v2/plugins/(?P<plugin>[^.\/]+(?:\/[^.\/]+)?)";b:0;s:29:"/wp/v2/block-directory/search";b:0;s:18:"/wp-site-health/v1";b:0;s:43:"/wp-site-health/v1/tests/background-updates";b:0;s:42:"/wp-site-health/v1/tests/loopback-requests";b:0;s:37:"/wp-site-health/v1/tests/https-status";b:0;s:45:"/wp-site-health/v1/tests/dotorg-communication";b:0;s:45:"/wp-site-health/v1/tests/authorization-header";b:0;s:34:"/wp-site-health/v1/directory-sizes";b:0;}}s:6:"editor";a:2:{s:13:"default_allow";b:0;s:10:"allow_list";a:62:{s:1:"/";b:0;s:9:"/batch/v1";b:0;s:11:"/oembed/1.0";b:0;s:17:"/oembed/1.0/embed";b:0;s:17:"/oembed/1.0/proxy";b:0;s:6:"/wp/v2";b:0;s:12:"/wp/v2/posts";b:0;s:32:"/wp/v2/posts/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/posts/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/posts/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/pages";b:0;s:32:"/wp/v2/pages/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/pages/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/pages/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/media";b:0;s:32:"/wp/v2/media/(?P<id>[\d]+)";b:0;s:45:"/wp/v2/media/(?P<id>[\d]+)/post-process";b:0;s:37:"/wp/v2/media/(?P<id>[\d]+)/edit";b:0;s:13:"/wp/v2/blocks";b:0;s:33:"/wp/v2/blocks/(?P<id>[\d]+)";b:0;s:43:"/wp/v2/blocks/(?P<id>[\d]+)/autosaves";b:0;s:67:"/wp/v2/blocks/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/types";b:0;s:35:"/wp/v2/types/(?P<type>[\w-]+)";b:0;s:15:"/wp/v2/statuses";b:0;s:40:"/wp/v2/statuses/(?P<status>[\w-]+)";b:0;s:17:"/wp/v2/taxonomies";b:0;s:44:"/wp/v2/taxonomies/(?P<taxonomy>[\w-]+)";b:0;s:17:"/wp/v2/categories";b:0;s:37:"/wp/v2/categories/(?P<id>[\d]+)";b:0;s:11:"/wp/v2/tags";b:0;s:31:"/wp/v2/tags/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/users";b:0;s:32:"/wp/v2/users/(?P<id>[\d]+)";b:0;s:15:"/wp/v2/users/me";b:0;s:66:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords";b:0;s:77:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/introspect";b:0;s:90:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/(?P<uuid>[\w\-]+)";b:0;s:15:"/wp/v2/comments";b:0;s:35:"/wp/v2/comments/(?P<id>[\d]+)";b:0;s:13:"/wp/v2/search";b:0;s:59:"/wp/v2/block-renderer/(?P<name>[a-z0-9-]+/[a-z0-9-]+)";b:0;s:18:"/wp/v2/block-types";b:0;s:54:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)";b:0;s:85:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)/(?P<name>[a-zA-Z0-9_-]+)";b:0;s:15:"/wp/v2/settings";b:0;s:13:"/wp/v2/themes";b:0;s:42:"/wp/v2/themes/(?P<stylesheet>[\w-]+)";b:0;s:14:"/wp/v2/plugins";b:0;s:54:"/wp/v2/plugins/(?P<plugin>[^.\/]+(?:\/[^.\/]+)?)";b:0;s:29:"/wp/v2/block-directory/search";b:0;s:18:"/wp-site-health/v1";b:0;s:43:"/wp-site-health/v1/tests/background-updates";b:0;s:42:"/wp-site-health/v1/tests/loopback-requests";b:0;s:37:"/wp-site-health/v1/tests/https-status";b:0;s:45:"/wp-site-health/v1/tests/dotorg-communication";b:0;s:45:"/wp-site-health/v1/tests/authorization-header";b:0;s:34:"/wp-site-health/v1/directory-sizes";b:0;}}}}' +mysql --password="$sqlpass" --database="$user" --execute="UPDATE wp_options SET option_value='$SETTINGS' WHERE option_name='disable_rest_api_options'" \ No newline at end of file From 9befcc30b359a9be5b2f064cd9b68157eb628f64 Mon Sep 17 00:00:00 2001 From: Shirai Kuroko Date: Fri, 28 May 2021 07:48:22 +0800 Subject: [PATCH 2/3] fix syntax errors, i was stupid --- makeservices/easywp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makeservices/easywp b/makeservices/easywp index 4815bd8..1665837 100755 --- a/makeservices/easywp +++ b/makeservices/easywp @@ -74,11 +74,11 @@ chmod 600 "$webroot/wp-config.php" echo "WordPress configuration creation successful. Setting it up..." read -rp 'Enter your desired site title. (Default: newsite)' sitetitle -if [ -z "$sitetitle"]; then +if [ -z "$sitetitle" ]; then sitetitle="newsite" fi read -rp 'Enter your desired admin username. (Default: admin)' adminname -if [ -z "$adminname"]; then +if [ -z "$adminname" ]; then adminname="admin" fi From 95caf447d456299796470d6d4dbfd1bb75771078 Mon Sep 17 00:00:00 2001 From: Shirai Kuroko Date: Sun, 17 Oct 2021 12:40:51 -0700 Subject: [PATCH 3/3] pre-commit --- makeservices/easywp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/makeservices/easywp b/makeservices/easywp index 1665837..d6621b4 100755 --- a/makeservices/easywp +++ b/makeservices/easywp @@ -85,14 +85,10 @@ fi echo "You admin e-mail will be '$(whoami)@ocf.berkeley.edu', the confirmation e-mail will not be sent to you." echo "WP-CLI will install wordpress for you. If you wish, enter your desired admin password and press enter; if you want one to be randomly generated for you, press enter." # Use --prompt so that password is not left in ~/.bash_history -wp core install --admin_user="$user" --admin_email="$(whoami)@ocf.berkeley.edu" --skip-email --title=$sitetitle --url="https://www.ocf.berkeley.edu/~$user/" --prompt=admin_password +wp core install --admin_user="$adminname" --admin_email="$(whoami)@ocf.berkeley.edu" --skip-email --title=$sitetitle --url="https://www.ocf.berkeley.edu/~$user/" --prompt=admin_password # As we had `set -e`, installation must be complete as otherwise the script will end. If it is incomplete, people will still know as this step is verbose. echo "Campus web security regulations require us to disable unauthenticated REST API. We will install a WordPress plug-in to do that. - You may use other plug-ins that achieve the same thing, you may also disable or remove it afterwards, but it is your responsibility + You may use other plug-ins that achieve the same thing, you may also disable or remove it afterwards, but it is your responsibility to ensure your site complies with regulations. Failure to do so may result in your account being suspended." wp plugin install disable-json-api --activate - -# Change settings, but seems like it does not work! -SETTINGS='a:3:{s:7:"version";s:3:"1.6";s:13:"default_allow";b:1;s:5:"roles";a:5:{s:4:"none";a:2:{s:13:"default_allow";b:0;s:10:"allow_list";a:62:{s:1:"/";b:0;s:9:"/batch/v1";b:0;s:11:"/oembed/1.0";b:0;s:17:"/oembed/1.0/embed";b:0;s:17:"/oembed/1.0/proxy";b:0;s:6:"/wp/v2";b:0;s:12:"/wp/v2/posts";b:0;s:32:"/wp/v2/posts/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/posts/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/posts/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/pages";b:0;s:32:"/wp/v2/pages/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/pages/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/pages/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/media";b:0;s:32:"/wp/v2/media/(?P<id>[\d]+)";b:0;s:45:"/wp/v2/media/(?P<id>[\d]+)/post-process";b:0;s:37:"/wp/v2/media/(?P<id>[\d]+)/edit";b:0;s:13:"/wp/v2/blocks";b:0;s:33:"/wp/v2/blocks/(?P<id>[\d]+)";b:0;s:43:"/wp/v2/blocks/(?P<id>[\d]+)/autosaves";b:0;s:67:"/wp/v2/blocks/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/types";b:0;s:35:"/wp/v2/types/(?P<type>[\w-]+)";b:0;s:15:"/wp/v2/statuses";b:0;s:40:"/wp/v2/statuses/(?P<status>[\w-]+)";b:0;s:17:"/wp/v2/taxonomies";b:0;s:44:"/wp/v2/taxonomies/(?P<taxonomy>[\w-]+)";b:0;s:17:"/wp/v2/categories";b:0;s:37:"/wp/v2/categories/(?P<id>[\d]+)";b:0;s:11:"/wp/v2/tags";b:0;s:31:"/wp/v2/tags/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/users";b:0;s:32:"/wp/v2/users/(?P<id>[\d]+)";b:0;s:15:"/wp/v2/users/me";b:0;s:66:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords";b:0;s:77:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/introspect";b:0;s:90:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/(?P<uuid>[\w\-]+)";b:0;s:15:"/wp/v2/comments";b:0;s:35:"/wp/v2/comments/(?P<id>[\d]+)";b:0;s:13:"/wp/v2/search";b:0;s:59:"/wp/v2/block-renderer/(?P<name>[a-z0-9-]+/[a-z0-9-]+)";b:0;s:18:"/wp/v2/block-types";b:0;s:54:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)";b:0;s:85:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)/(?P<name>[a-zA-Z0-9_-]+)";b:0;s:15:"/wp/v2/settings";b:0;s:13:"/wp/v2/themes";b:0;s:42:"/wp/v2/themes/(?P<stylesheet>[\w-]+)";b:0;s:14:"/wp/v2/plugins";b:0;s:54:"/wp/v2/plugins/(?P<plugin>[^.\/]+(?:\/[^.\/]+)?)";b:0;s:29:"/wp/v2/block-directory/search";b:0;s:18:"/wp-site-health/v1";b:0;s:43:"/wp-site-health/v1/tests/background-updates";b:0;s:42:"/wp-site-health/v1/tests/loopback-requests";b:0;s:37:"/wp-site-health/v1/tests/https-status";b:0;s:45:"/wp-site-health/v1/tests/dotorg-communication";b:0;s:45:"/wp-site-health/v1/tests/authorization-header";b:0;s:34:"/wp-site-health/v1/directory-sizes";b:0;}}s:10:"subscriber";a:2:{s:13:"default_allow";b:0;s:10:"allow_list";a:62:{s:1:"/";b:0;s:9:"/batch/v1";b:0;s:11:"/oembed/1.0";b:0;s:17:"/oembed/1.0/embed";b:0;s:17:"/oembed/1.0/proxy";b:0;s:6:"/wp/v2";b:0;s:12:"/wp/v2/posts";b:0;s:32:"/wp/v2/posts/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/posts/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/posts/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/pages";b:0;s:32:"/wp/v2/pages/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/pages/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/pages/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/media";b:0;s:32:"/wp/v2/media/(?P<id>[\d]+)";b:0;s:45:"/wp/v2/media/(?P<id>[\d]+)/post-process";b:0;s:37:"/wp/v2/media/(?P<id>[\d]+)/edit";b:0;s:13:"/wp/v2/blocks";b:0;s:33:"/wp/v2/blocks/(?P<id>[\d]+)";b:0;s:43:"/wp/v2/blocks/(?P<id>[\d]+)/autosaves";b:0;s:67:"/wp/v2/blocks/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/types";b:0;s:35:"/wp/v2/types/(?P<type>[\w-]+)";b:0;s:15:"/wp/v2/statuses";b:0;s:40:"/wp/v2/statuses/(?P<status>[\w-]+)";b:0;s:17:"/wp/v2/taxonomies";b:0;s:44:"/wp/v2/taxonomies/(?P<taxonomy>[\w-]+)";b:0;s:17:"/wp/v2/categories";b:0;s:37:"/wp/v2/categories/(?P<id>[\d]+)";b:0;s:11:"/wp/v2/tags";b:0;s:31:"/wp/v2/tags/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/users";b:0;s:32:"/wp/v2/users/(?P<id>[\d]+)";b:0;s:15:"/wp/v2/users/me";b:0;s:66:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords";b:0;s:77:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/introspect";b:0;s:90:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/(?P<uuid>[\w\-]+)";b:0;s:15:"/wp/v2/comments";b:0;s:35:"/wp/v2/comments/(?P<id>[\d]+)";b:0;s:13:"/wp/v2/search";b:0;s:59:"/wp/v2/block-renderer/(?P<name>[a-z0-9-]+/[a-z0-9-]+)";b:0;s:18:"/wp/v2/block-types";b:0;s:54:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)";b:0;s:85:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)/(?P<name>[a-zA-Z0-9_-]+)";b:0;s:15:"/wp/v2/settings";b:0;s:13:"/wp/v2/themes";b:0;s:42:"/wp/v2/themes/(?P<stylesheet>[\w-]+)";b:0;s:14:"/wp/v2/plugins";b:0;s:54:"/wp/v2/plugins/(?P<plugin>[^.\/]+(?:\/[^.\/]+)?)";b:0;s:29:"/wp/v2/block-directory/search";b:0;s:18:"/wp-site-health/v1";b:0;s:43:"/wp-site-health/v1/tests/background-updates";b:0;s:42:"/wp-site-health/v1/tests/loopback-requests";b:0;s:37:"/wp-site-health/v1/tests/https-status";b:0;s:45:"/wp-site-health/v1/tests/dotorg-communication";b:0;s:45:"/wp-site-health/v1/tests/authorization-header";b:0;s:34:"/wp-site-health/v1/directory-sizes";b:0;}}s:11:"contributor";a:2:{s:13:"default_allow";b:0;s:10:"allow_list";a:62:{s:1:"/";b:0;s:9:"/batch/v1";b:0;s:11:"/oembed/1.0";b:0;s:17:"/oembed/1.0/embed";b:0;s:17:"/oembed/1.0/proxy";b:0;s:6:"/wp/v2";b:0;s:12:"/wp/v2/posts";b:0;s:32:"/wp/v2/posts/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/posts/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/posts/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/pages";b:0;s:32:"/wp/v2/pages/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/pages/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/pages/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/media";b:0;s:32:"/wp/v2/media/(?P<id>[\d]+)";b:0;s:45:"/wp/v2/media/(?P<id>[\d]+)/post-process";b:0;s:37:"/wp/v2/media/(?P<id>[\d]+)/edit";b:0;s:13:"/wp/v2/blocks";b:0;s:33:"/wp/v2/blocks/(?P<id>[\d]+)";b:0;s:43:"/wp/v2/blocks/(?P<id>[\d]+)/autosaves";b:0;s:67:"/wp/v2/blocks/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/types";b:0;s:35:"/wp/v2/types/(?P<type>[\w-]+)";b:0;s:15:"/wp/v2/statuses";b:0;s:40:"/wp/v2/statuses/(?P<status>[\w-]+)";b:0;s:17:"/wp/v2/taxonomies";b:0;s:44:"/wp/v2/taxonomies/(?P<taxonomy>[\w-]+)";b:0;s:17:"/wp/v2/categories";b:0;s:37:"/wp/v2/categories/(?P<id>[\d]+)";b:0;s:11:"/wp/v2/tags";b:0;s:31:"/wp/v2/tags/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/users";b:0;s:32:"/wp/v2/users/(?P<id>[\d]+)";b:0;s:15:"/wp/v2/users/me";b:0;s:66:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords";b:0;s:77:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/introspect";b:0;s:90:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/(?P<uuid>[\w\-]+)";b:0;s:15:"/wp/v2/comments";b:0;s:35:"/wp/v2/comments/(?P<id>[\d]+)";b:0;s:13:"/wp/v2/search";b:0;s:59:"/wp/v2/block-renderer/(?P<name>[a-z0-9-]+/[a-z0-9-]+)";b:0;s:18:"/wp/v2/block-types";b:0;s:54:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)";b:0;s:85:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)/(?P<name>[a-zA-Z0-9_-]+)";b:0;s:15:"/wp/v2/settings";b:0;s:13:"/wp/v2/themes";b:0;s:42:"/wp/v2/themes/(?P<stylesheet>[\w-]+)";b:0;s:14:"/wp/v2/plugins";b:0;s:54:"/wp/v2/plugins/(?P<plugin>[^.\/]+(?:\/[^.\/]+)?)";b:0;s:29:"/wp/v2/block-directory/search";b:0;s:18:"/wp-site-health/v1";b:0;s:43:"/wp-site-health/v1/tests/background-updates";b:0;s:42:"/wp-site-health/v1/tests/loopback-requests";b:0;s:37:"/wp-site-health/v1/tests/https-status";b:0;s:45:"/wp-site-health/v1/tests/dotorg-communication";b:0;s:45:"/wp-site-health/v1/tests/authorization-header";b:0;s:34:"/wp-site-health/v1/directory-sizes";b:0;}}s:6:"author";a:2:{s:13:"default_allow";b:0;s:10:"allow_list";a:62:{s:1:"/";b:0;s:9:"/batch/v1";b:0;s:11:"/oembed/1.0";b:0;s:17:"/oembed/1.0/embed";b:0;s:17:"/oembed/1.0/proxy";b:0;s:6:"/wp/v2";b:0;s:12:"/wp/v2/posts";b:0;s:32:"/wp/v2/posts/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/posts/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/posts/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/pages";b:0;s:32:"/wp/v2/pages/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/pages/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/pages/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/media";b:0;s:32:"/wp/v2/media/(?P<id>[\d]+)";b:0;s:45:"/wp/v2/media/(?P<id>[\d]+)/post-process";b:0;s:37:"/wp/v2/media/(?P<id>[\d]+)/edit";b:0;s:13:"/wp/v2/blocks";b:0;s:33:"/wp/v2/blocks/(?P<id>[\d]+)";b:0;s:43:"/wp/v2/blocks/(?P<id>[\d]+)/autosaves";b:0;s:67:"/wp/v2/blocks/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/types";b:0;s:35:"/wp/v2/types/(?P<type>[\w-]+)";b:0;s:15:"/wp/v2/statuses";b:0;s:40:"/wp/v2/statuses/(?P<status>[\w-]+)";b:0;s:17:"/wp/v2/taxonomies";b:0;s:44:"/wp/v2/taxonomies/(?P<taxonomy>[\w-]+)";b:0;s:17:"/wp/v2/categories";b:0;s:37:"/wp/v2/categories/(?P<id>[\d]+)";b:0;s:11:"/wp/v2/tags";b:0;s:31:"/wp/v2/tags/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/users";b:0;s:32:"/wp/v2/users/(?P<id>[\d]+)";b:0;s:15:"/wp/v2/users/me";b:0;s:66:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords";b:0;s:77:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/introspect";b:0;s:90:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/(?P<uuid>[\w\-]+)";b:0;s:15:"/wp/v2/comments";b:0;s:35:"/wp/v2/comments/(?P<id>[\d]+)";b:0;s:13:"/wp/v2/search";b:0;s:59:"/wp/v2/block-renderer/(?P<name>[a-z0-9-]+/[a-z0-9-]+)";b:0;s:18:"/wp/v2/block-types";b:0;s:54:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)";b:0;s:85:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)/(?P<name>[a-zA-Z0-9_-]+)";b:0;s:15:"/wp/v2/settings";b:0;s:13:"/wp/v2/themes";b:0;s:42:"/wp/v2/themes/(?P<stylesheet>[\w-]+)";b:0;s:14:"/wp/v2/plugins";b:0;s:54:"/wp/v2/plugins/(?P<plugin>[^.\/]+(?:\/[^.\/]+)?)";b:0;s:29:"/wp/v2/block-directory/search";b:0;s:18:"/wp-site-health/v1";b:0;s:43:"/wp-site-health/v1/tests/background-updates";b:0;s:42:"/wp-site-health/v1/tests/loopback-requests";b:0;s:37:"/wp-site-health/v1/tests/https-status";b:0;s:45:"/wp-site-health/v1/tests/dotorg-communication";b:0;s:45:"/wp-site-health/v1/tests/authorization-header";b:0;s:34:"/wp-site-health/v1/directory-sizes";b:0;}}s:6:"editor";a:2:{s:13:"default_allow";b:0;s:10:"allow_list";a:62:{s:1:"/";b:0;s:9:"/batch/v1";b:0;s:11:"/oembed/1.0";b:0;s:17:"/oembed/1.0/embed";b:0;s:17:"/oembed/1.0/proxy";b:0;s:6:"/wp/v2";b:0;s:12:"/wp/v2/posts";b:0;s:32:"/wp/v2/posts/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/posts/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/posts/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/posts/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/pages";b:0;s:32:"/wp/v2/pages/(?P<id>[\d]+)";b:0;s:46:"/wp/v2/pages/(?P<parent>[\d]+)/revisions";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+)";b:0;s:42:"/wp/v2/pages/(?P<id>[\d]+)/autosaves";b:0;s:66:"/wp/v2/pages/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/media";b:0;s:32:"/wp/v2/media/(?P<id>[\d]+)";b:0;s:45:"/wp/v2/media/(?P<id>[\d]+)/post-process";b:0;s:37:"/wp/v2/media/(?P<id>[\d]+)/edit";b:0;s:13:"/wp/v2/blocks";b:0;s:33:"/wp/v2/blocks/(?P<id>[\d]+)";b:0;s:43:"/wp/v2/blocks/(?P<id>[\d]+)/autosaves";b:0;s:67:"/wp/v2/blocks/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/types";b:0;s:35:"/wp/v2/types/(?P<type>[\w-]+)";b:0;s:15:"/wp/v2/statuses";b:0;s:40:"/wp/v2/statuses/(?P<status>[\w-]+)";b:0;s:17:"/wp/v2/taxonomies";b:0;s:44:"/wp/v2/taxonomies/(?P<taxonomy>[\w-]+)";b:0;s:17:"/wp/v2/categories";b:0;s:37:"/wp/v2/categories/(?P<id>[\d]+)";b:0;s:11:"/wp/v2/tags";b:0;s:31:"/wp/v2/tags/(?P<id>[\d]+)";b:0;s:12:"/wp/v2/users";b:0;s:32:"/wp/v2/users/(?P<id>[\d]+)";b:0;s:15:"/wp/v2/users/me";b:0;s:66:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords";b:0;s:77:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/introspect";b:0;s:90:"/wp/v2/users/(?P<user_id>(?:[\d]+|me))/application-passwords/(?P<uuid>[\w\-]+)";b:0;s:15:"/wp/v2/comments";b:0;s:35:"/wp/v2/comments/(?P<id>[\d]+)";b:0;s:13:"/wp/v2/search";b:0;s:59:"/wp/v2/block-renderer/(?P<name>[a-z0-9-]+/[a-z0-9-]+)";b:0;s:18:"/wp/v2/block-types";b:0;s:54:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)";b:0;s:85:"/wp/v2/block-types/(?P<namespace>[a-zA-Z0-9_-]+)/(?P<name>[a-zA-Z0-9_-]+)";b:0;s:15:"/wp/v2/settings";b:0;s:13:"/wp/v2/themes";b:0;s:42:"/wp/v2/themes/(?P<stylesheet>[\w-]+)";b:0;s:14:"/wp/v2/plugins";b:0;s:54:"/wp/v2/plugins/(?P<plugin>[^.\/]+(?:\/[^.\/]+)?)";b:0;s:29:"/wp/v2/block-directory/search";b:0;s:18:"/wp-site-health/v1";b:0;s:43:"/wp-site-health/v1/tests/background-updates";b:0;s:42:"/wp-site-health/v1/tests/loopback-requests";b:0;s:37:"/wp-site-health/v1/tests/https-status";b:0;s:45:"/wp-site-health/v1/tests/dotorg-communication";b:0;s:45:"/wp-site-health/v1/tests/authorization-header";b:0;s:34:"/wp-site-health/v1/directory-sizes";b:0;}}}}' -mysql --password="$sqlpass" --database="$user" --execute="UPDATE wp_options SET option_value='$SETTINGS' WHERE option_name='disable_rest_api_options'" \ No newline at end of file