Inputs for login/auth source dosnt get trimmed on save #9488

Open
opened 2025-11-02 08:40:28 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @Mai-Lapyst on GitHub (Aug 31, 2022).

Description

The values of the input fields in the admin page for editing auth-sources (i.e. http://localhost:3000/admin/auths/1 ) aren't trimed when saveing.

The only time the value get's trimmed is when the page is reloaded, then the input fields contain the proper trimmed value's and a save will then correctly write the values to the database.

Gitea Version

1.17.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Binary distribution of 1.17.1

Database

SQLite

Originally created by @Mai-Lapyst on GitHub (Aug 31, 2022). ### Description The values of the input fields in the admin page for editing auth-sources (i.e. http://localhost:3000/admin/auths/1 ) aren't trimed when saveing. The only time the value get's trimmed is when the page is reloaded, then the input fields contain the proper trimmed value's and a save will then correctly write the values to the database. ### Gitea Version 1.17.1 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Binary distribution of 1.17.1 ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 08:40:28 -06:00
Author
Owner

@zeripath commented on GitHub (Sep 1, 2022):

as far as I'm aware, almost no inputs are whitespace trimmed across Gitea.

Perhaps in general we should be whitespace trimming, but I guess I'm confused as to why this is a particular issue related to this page?

@zeripath commented on GitHub (Sep 1, 2022): as far as I'm aware, almost no inputs are whitespace trimmed across Gitea. Perhaps in general we should be whitespace trimming, but I guess I'm confused as to why this is a particular issue related to this page?
Author
Owner

@Mai-Lapyst commented on GitHub (Sep 2, 2022):

When gitea really does no whitespace trimming across the whole application, then this issue maybe need to be converted to include all of gitea.

I just found it on that page and honestly didn't looked into other parts of gitea to test if the issue also exists there.

@Mai-Lapyst commented on GitHub (Sep 2, 2022): When gitea really does no whitespace trimming across the whole application, then this issue maybe need to be converted to include all of gitea. I just found it on that page and honestly didn't looked into other parts of gitea to test if the issue also exists there.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9488