SSL Mode showed as ON while instead is OFF #1373

Closed
opened 2025-11-02 03:58:17 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @strk on GitHub (Dec 16, 2017).

As of bdf1856011 (1.3.0-dev) installed locally, the /admin/config page under the Database Configuration section has SSL Mode checkbox checked, but custom/config/app.ini has SSL_MODE = disable under the [database] section (and would not work otherwise, because my server does not support SSL.

Originally created by @strk on GitHub (Dec 16, 2017). As of bdf18560110ac642c196054be38729760a4bbc39 (1.3.0-dev) installed locally, the `/admin/config` page under the ` Database Configuration ` section has `SSL Mode` checkbox checked, but custom/config/app.ini has `SSL_MODE = disable` under the `[database]` section (and would not work otherwise, because my server does not support SSL.
Author
Owner

@strk commented on GitHub (Dec 16, 2017):

templates/admin/config.tmpl uses {{if .DbCfg.SSLMode}} as a conditional, but that variable is a string !

@strk commented on GitHub (Dec 16, 2017): templates/admin/config.tmpl uses `{{if .DbCfg.SSLMode}}` as a conditional, but that variable is a string !
Author
Owner

@strk commented on GitHub (Dec 16, 2017):

Assignment to that variable is:

DbCfg.SSLMode = sec.Key("SSL_MODE").String()

Shoudl the variable be converted to a boolean instead of kept as string ?

@strk commented on GitHub (Dec 16, 2017): Assignment to that variable is: ``` DbCfg.SSLMode = sec.Key("SSL_MODE").String() ``` Shoudl the variable be converted to a boolean instead of kept as string ?
Author
Owner

@strk commented on GitHub (Dec 16, 2017):

https://github.com/go-gitea/gitea/pull/3208 turns that checkbox into a string, following configuration (accepting 4 different strings at the moment)

@strk commented on GitHub (Dec 16, 2017): https://github.com/go-gitea/gitea/pull/3208 turns that checkbox into a string, following configuration (accepting 4 different strings at the moment)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1373