SessionProvider MySQL credentials are shown in the admin GUI as plaintext #3437

Closed
opened 2025-11-02 05:12:57 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @vpr-ossteam on GitHub (Jun 6, 2019).

  • Gitea version (or commit ref): 1.8.1
  • Git version: 2.7.4
  • Operating system: Ubuntu 16.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Greetings!
I'm using Gitea 1.8.1 with MySQL 5.7. And if I'm using MySQL for session storing purposes, I can see the credentials in GUI as plaintext.

Steps to reproduce

  1. Select MySQL like a sessions storage in the config file:
[session]
PROVIDER        = mysql
PROVIDER_CONFIG = someclient:somepassword@tcp(srv-mysql:3306)/someclient
  1. Reload Gitea
  2. Login in into Gitea with admin credentials
  3. Follow this way: Site Administration ⇒ Configuration ⇒ Session Configuration ⇒ Provider Config

Screenshots

20190525-152945

Originally created by @vpr-ossteam on GitHub (Jun 6, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.8.1 - Git version: 2.7.4 - Operating system: Ubuntu 16.04 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description Greetings! I'm using Gitea 1.8.1 with MySQL 5.7. And if I'm using MySQL for session storing purposes, I can see the credentials in GUI as plaintext. **Steps to reproduce** 1. Select MySQL like a sessions storage in the config file: ``` [session] PROVIDER = mysql PROVIDER_CONFIG = someclient:somepassword@tcp(srv-mysql:3306)/someclient ``` 2. Reload Gitea 3. Login in into Gitea with admin credentials 4. Follow this way: Site Administration ⇒ Configuration ⇒ Session Configuration ⇒ Provider Config ## Screenshots ![20190525-152945](https://user-images.githubusercontent.com/23170292/59055478-935bfb80-889e-11e9-90d5-6b99fc211fe0.png) <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the topic/security label 2025-11-02 05:12:57 -06:00
Author
Owner

@markkrj commented on GitHub (Nov 21, 2019):

I still can see the password. I'm on version 1.10.0.
image

Edit: Tested same config with 1.9.0 and also shows unmasked password.

@markkrj commented on GitHub (Nov 21, 2019): I still can see the password. I'm on version 1.10.0. ![image](https://user-images.githubusercontent.com/13537652/69361304-f5e95e00-0c6a-11ea-86bc-71979a2969ef.png) Edit: Tested same config with 1.9.0 and also shows unmasked password.
Author
Owner

@zeripath commented on GitHub (Nov 22, 2019):

This was reFixed in #9002 and #8984

@zeripath commented on GitHub (Nov 22, 2019): This was reFixed in #9002 and #8984
Author
Owner

@markkrj commented on GitHub (Nov 22, 2019):

@zeripath Well, now it shows nothing:
image
Running 1.10.0+10-gade5ec5aa

But still better than showing credentials.

@markkrj commented on GitHub (Nov 22, 2019): @zeripath Well, now it shows nothing: ![image](https://user-images.githubusercontent.com/13537652/69434813-238edf80-0d1d-11ea-8f18-d009c5e7b4ce.png) Running 1.10.0+10-gade5ec5aa But still better than showing credentials.
Author
Owner

@zeripath commented on GitHub (Nov 22, 2019):

Do you have/get any logs?

@zeripath commented on GitHub (Nov 22, 2019): Do you have/get any logs?
Author
Owner

@markkrj commented on GitHub (Nov 22, 2019):

No errors or strange logs in console, just usual router logs... I have the default gitea.log. Tell me if you need more.

@markkrj commented on GitHub (Nov 22, 2019): No errors or strange logs in console, just usual router logs... I have the default [gitea.log](https://github.com/go-gitea/gitea/files/3880752/gitea.log). Tell me if you need more.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3437