Internal Server error when doing a POST with invalid emails on /v1/user/emails #8825

Closed
opened 2025-11-02 08:20:03 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @ludovicianul on GitHub (Apr 13, 2022).

Description

While doing some fuzzing using https://github.com/Endava/cats I discovered an issue for the /v1/user/emails endpoint. Doing a POST with an invalid email address results in a 500, rather that something more meaningful.

You can reproduce the issue using (just replace $token with your own token):

cats replay Test228.json

Or using the payload:

{
  "emails": [
    "yCUjse4J",
    "yCUjse4J"
  ],
  "catsFuzzyField": "catsFuzzyField"
}

Test228.json.zip

Gitea Version

1.17.0+dev-423-g4396d0e7c

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Using https://try.gitea.io/.

Database

No response

Originally created by @ludovicianul on GitHub (Apr 13, 2022). ### Description While doing some fuzzing using https://github.com/Endava/cats I discovered an issue for the `/v1/user/emails` endpoint. Doing a POST with an invalid email address results in a 500, rather that something more meaningful. You can reproduce the issue using (just replace $token with your own token): `cats replay Test228.json` Or using the payload: ```json { "emails": [ "yCUjse4J", "yCUjse4J" ], "catsFuzzyField": "catsFuzzyField" } ``` [Test228.json.zip](https://github.com/go-gitea/gitea/files/8484335/Test228.json.zip) ### Gitea Version 1.17.0+dev-423-g4396d0e7c ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Using https://try.gitea.io/. ### Database _No response_
GiteaMirror added the issue/confirmedtype/bugmodifies/api labels 2025-11-02 08:20:03 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8825