[wp-trac] [WordPress Trac] #64861: _wp_connectors_init() should sanitize provider ID

WordPress Trac noreply at wordpress.org
Thu Mar 19 06:50:25 UTC 2026


#64861: _wp_connectors_init() should sanitize provider ID
--------------------------------------+---------------------
 Reporter:  PerS                      |       Owner:  gziolo
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  7.0
Component:  AI                        |     Version:  trunk
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------
Changes (by gziolo):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"62056" 62056]:
 {{{
 #!CommitTicketReference repository="" revision="62056"
 Connectors: Allow hyphens in connector IDs

 Expands the connector ID validation regex from `/^[a-z0-9_]+$/` to
 `/^[a-z0-9_-]+$/`, aligning with the PHP AI Client library naming
 conventions. Hyphens are normalized to underscores when generating
 `setting_name` (e.g., `azure-openai` →
 `connectors_ai_azure_openai_api_key`).

 Developed in https://github.com/WordPress/wordpress-develop/pull/11285.

 Props pers, gziolo, jorgefilipecosta, westonruter, flixos90, mukesh27.
 Fixes #64861.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64861#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list