Skip to content

Check if domain exists before creating / updating. - #4

Merged
lloc merged 4 commits into
lloc:feature/40365-rest-sites-endpointfrom
spacedmonkey:feature/40365-rest-sites-endpoint-check-exists
Sep 11, 2026
Merged

lloc merged 4 commits into
lloc:feature/40365-rest-sites-endpointfrom
spacedmonkey:feature/40365-rest-sites-endpoint-check-exists

Conversation

@spacedmonkey

Copy link
Copy Markdown

Trac ticket:

Use of AI Tools


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props spacedmonkey.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Add format validation for the `domain` and `path` parameters in
WP_REST_Sites_Controller so malformed values are rejected with a clean
400 rest_invalid_param instead of failing later inside wp_insert_site()/
wp_update_site() (which surfaces as a 500).

domain must be a valid hostname or bare IPv4/IPv6 address, optionally
followed by a port (bracketed IPv6 is intentionally not supported, so
IPv6 addresses can't carry a port). path must start and end with a
forward slash and be made up of characters valid in a URL path segment.

Ticket #40365.
…t-check-exists' into feature/40365-rest-sites-endpoint-check-exists

# Conflicts:
#	src/wp-includes/rest-api/endpoints/class-wp-rest-sites-controller.php
@lloc
lloc merged commit a8889ee into lloc:feature/40365-rest-sites-endpoint Sep 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants