Skip to content

Fix docblock to reflect POST and PUT support in API key validation#76348

Merged
gziolo merged 2 commits intorefactor/connectors-rest-level-validation-maskingfrom
copilot/sub-pr-76327
Mar 10, 2026
Merged

Fix docblock to reflect POST and PUT support in API key validation#76348
gziolo merged 2 commits intorefactor/connectors-rest-level-validation-maskingfrom
copilot/sub-pr-76327

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

The docblock for _gutenberg_connectors_rest_settings_dispatch() stated validation runs on "POST requests", but the implementation checks for both POST and PUT methods.

Changes

  • lib/experimental/connectors/default-connectors.php: Updated the docblock to read "On POST or PUT requests" to match the actual $is_update condition:
// Before
* On POST requests, validates each updated key against the provider before
* masking. If validation fails, the key is reverted to an empty string.

// After
* On POST or PUT requests, validates each updated key against the provider
* before masking. If validation fails, the key is reverted to an empty string.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: gziolo <699132+gziolo@users.noreply.github.com>
Copilot AI changed the title [WIP] Update API key validation and masking based on feedback Fix docblock to reflect POST and PUT support in API key validation Mar 10, 2026
@gziolo gziolo marked this pull request as ready for review March 10, 2026 09:56
@gziolo gziolo requested a review from spacedmonkey as a code owner March 10, 2026 09:56
@github-actions
Copy link

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Required label: Any label starting with [Type].
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

1 similar comment
@github-actions
Copy link

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Required label: Any label starting with [Type].
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions
Copy link

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.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @Copilot.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: Copilot.

Co-authored-by: gziolo <gziolo@git.wordpress.org>

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

@gziolo gziolo merged commit 5fc0290 into refactor/connectors-rest-level-validation-masking Mar 10, 2026
2 of 4 checks passed
@gziolo gziolo deleted the copilot/sub-pr-76327 branch March 10, 2026 09:57
jorgefilipecosta pushed a commit that referenced this pull request Mar 10, 2026
…76348)

* Initial plan

* Fix docblock to mention both POST and PUT methods for API key validation

Co-authored-by: gziolo <699132+gziolo@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gziolo <699132+gziolo@users.noreply.github.com>
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