Opened 20 months ago
Last modified 20 months ago
#54240 new defect (bug)
WP REST API Users Endpoint Search
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.8.1 |
Component: | REST API | Keywords: | has-patch reporter-feedback |
Focuses: | rest-api | Cc: |
Description
The WP REST API Users endpoint doesn't support plus addresses when searching using the search parameter - /wp-json/wp/v2/users/?search=example+label@…
Plus addressing is a handy Google Workspace and Office 365 feature that I'm noticing adoption of more and more.
Attachments (1)
Change History (6)
#2
@
20 months ago
@swissspidy I think you got it wrong. Plus addressing is like adding a random string to your email following by a +
before @tld
and still getting the email delivered in the original email address. For example my email is sabbir@domain.com
, a plus address can be like sabbir+wordpress@domain.com
@damianem users in wordpress should have a valid email address. Also I don't see any valid reason to adopt plus addressing support rest-api use fetching.
@swissspidy for automatically encoding search param value we can urlencode
the input value. I'll add a patch for that.
#3
@
20 months ago
I know what plus addressing is.
What I am saying is @damianem should urlencode the email address in their code/browser before making the REST API request.
Because if you don't do that, the plus sign in /wp-json/wp/v2/users/?search=example+label@…
might be interpreted as a space character.
Have you tried properly encode the email address because of the plus sign? e.g.
?search=example%2Blabel...