Skip to content

Unnecessary required parameter in api #18935

Open
@orangebokov

Description

@orangebokov

Gitea Version

1.16.1

Git Version

2.20.1

Operating System

Mac OS Mojave 10.14.6

How are you running Gitea?

Via terminal command gitea

Database

MySQL

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

This method in api
Снимок экрана 2022-02-27 в 20 37 45

Requires mandatory json parameter login_name
Снимок экрана 2022-02-27 в 20 39 35

What for? The request will be executed in any case for the {username} specified in the query string.
Снимок экрана 2022-02-27 в 20 37 45

But if I specify the wrong login_name, it will be updated, but the request will be executed anyway for {username}

Apparently, this is an extra parameter that does not affect the request in any way.

If I want to update the user's email, I can update it without passing login_name, because it will be updated for {username}

Right?

Screenshots

Снимок экрана 2022-02-27 в 20 49 35

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/docsThis PR mainly updates/creates documentationtype/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions