1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-06 17:41:00 +00:00

Do not show secrets in plain text on the /about page

This commit is contained in:
Frédéric Guillot 2021-10-17 16:49:37 -07:00 committed by fguillot
parent 5f9d6fd81b
commit 87d58987a6
3 changed files with 20 additions and 11 deletions

View file

@ -215,12 +215,12 @@ func parseBaseURL(value string) (string, string, string, error) {
url, err := url_parser.Parse(value)
if err != nil {
return "", "", "", fmt.Errorf("Invalid BASE_URL: %v", err)
return "", "", "", fmt.Errorf("config: invalid BASE_URL: %w", err)
}
scheme := strings.ToLower(url.Scheme)
if scheme != "https" && scheme != "http" {
return "", "", "", errors.New("Invalid BASE_URL: scheme must be http or https")
return "", "", "", errors.New("config: invalid BASE_URL: scheme must be http or https")
}
basePath := url.Path