Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pprof is public accessible even when ENABLE_PPROF=false #4966

Closed
1 task done
krombel opened this issue Sep 20, 2018 · 1 comment · Fixed by #4995
Closed
1 task done

pprof is public accessible even when ENABLE_PPROF=false #4966

krombel opened this issue Sep 20, 2018 · 1 comment · Fixed by #4995
Labels
Milestone

Comments

@krombel
Copy link

krombel commented Sep 20, 2018

Description

I do not expect to have those debug information public available.

Those get added in go-macaron/toolbox

m.Any(path.Join(opt.PprofURLPrefix, "cmdline"), pprof.Cmdline)
m.Any(path.Join(opt.PprofURLPrefix, "profile"), pprof.Profile)
m.Any(path.Join(opt.PprofURLPrefix, "symbol"), pprof.Symbol)
m.Any(opt.PprofURLPrefix, pprof.Index)
m.Any(path.Join(opt.PprofURLPrefix, "*"), pprof.Index)

which got added in #1290:
m.Use(toolbox.Toolboxer(m, toolbox.Options{
HealthCheckFuncs: []*toolbox.HealthCheckFuncDesc{
{
Desc: "Database connection",
Func: models.Ping,
},
},
}))

Badly there does not seem to be an option to disable this without removing the Toolbox completly.

//EDIT: As a temporary workaround I added this to my nginx config:

        location /debug {
                return 403;
        }
@L-P
Copy link

L-P commented Sep 26, 2018

I can confirm this issue is present on the official v1.5.1 docker image.

@lunny lunny added the type/bug label Sep 26, 2018
@lunny lunny added this to the 1.5.2 milestone Sep 26, 2018
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants