Skip to content

Commit c025ee6

Browse files
committed
Merge pull request revel#881 from revel/bug/production-panic-trace-831
Only shows debug stack details in DevMode
2 parents 78f8915 + a5b8524 commit c025ee6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

panic.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ func PanicFilter(c *Controller, fc []Filter) {
1919
// It cleans up the stack trace, logs it, and displays an error page.
2020
func handleInvocationPanic(c *Controller, err interface{}) {
2121
error := NewErrorFromPanic(err)
22-
if error == nil {
22+
if error == nil && DevMode {
23+
// Only show the sensitive information in the debug stack trace in development mode, not production
2324
ERROR.Print(err, "\n", string(debug.Stack()))
2425
c.Response.Out.WriteHeader(500)
2526
c.Response.Out.Write(debug.Stack())

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy