Skip to content

Internal Server error returned when doing a POST at /v1/user/repos with invalid data #19399

@ludovicianul

Description

@ludovicianul

Description

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

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

cats replay Test245.json

Test245.json.zip

Or using the following payload:

{
  "auto_init": true,
  "template": true,
  "issue_labels": "eEitLJaqLAv8GH",
  "license": "EJ4mZaqiB",
  "private": true,
  "trust_model": "default",
  "gitignores": "PnCQ60J8mksk8",
  "name": "L6fxpx",
  "description": "16udnqV6IumI",
  "default_branch": "J7ysZ6klvPLAP1G",
  "readme": "xN9l4LLHnL",
  "catsFuzzyField": "catsFuzzyField"
}

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    modifies/apiThis PR adds API routes or modifies themtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions