Azure / Azure/api-management-developer-portal

Self-hosted - user activation produces 404 when + sign in username

Open
#2,806 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
545
Forks
360
PR merge metrics
No merged PRs in 30d

Description

## Bug description

When creating a user account with a **`+` sign** in the username (e.g., `test+api@gmail.com`), the **account activation link: https://{api-name}.developer.azure-api.net/mapi/users/{userId}/identities/Basic/{userEmail}?api-version=2022-04-01-preview** results in a **404 error** when accessed.

## Reproduction steps

1. Go to the **sign-up** page in the developer portal.
2. Create a new user with an email like `test+api@gmail.com`.
3. Submit the registration.
4. Receive the account activation link via email.
5. Fill activation link and headers with proper values from $ConfirmQuery value and send put request using e.g. insomnia
6. Observe that it leads to a **404 Not Found** error page.
## Expected behavior

The activation link should correctly activate user and return 200, even when the email address contains a `+` character.

## Is self-hosted portal?

Yes

## Release tag or commit SHA (if using self-hosted version)

[https://github.com/Azure/api-management-developer-portal/blob/master/src/services/usersService.ts](https://github.com/Azure/api-management-developer-portal/blob/master/src/services/usersService.ts)

## Environment

- **Operating system:** Windows 11
- **Client:** Insomnia 11.0.2

## Additional context

Encoded `+` character along with `@` character produces 404 as well.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading src/services/usersService.ts and trace how the activation URL is constructed or sent for emails containing a + character. Reproduce the self-hosted flow with an address such as test+api@gmail.com and verify that the activation request returns 200 instead of 404.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, typescript
Domain
api, authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.