[wp-trac] [WordPress Trac] #64819: Revisit AI provider API key masking & validation
WordPress Trac
noreply at wordpress.org
Fri Mar 6 07:08:26 UTC 2026
#64819: Revisit AI provider API key masking & validation
--------------------------+--------------------
Reporter: swissspidy | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 7.0
Component: AI | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+--------------------
_wp_connectors_is_ai_api_key_valid in the sanitize_callback is a bit
annoying because it means I can't just do wp option update
connectors_ai_openai_api_key 1234 in WP-CLI, because it won't pass
validation
It's also not typical for a command like wp option get
connectors_ai_google_api_key to not return the actual raw value.
I also can't do wp option update connectors_ai_google_api_key "" to set
the option to an empty value, because, again, the validation fails. I have
to delete the option, which is not great for caching / db queries.
Soo... can we do this masking and validation somewhere else? And not in a
weird way like that _wp_connectors_validate_keys_in_rest hack btw
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64819>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list