From af7f71207c3e9f62a873e3d4a0b57cdbfe121bb1 Mon Sep 17 00:00:00 2001 From: PhilAtWysdom Date: Wed, 27 Jan 2021 13:33:32 +0000 Subject: [PATCH] Fix: url.Values map was not initialized (#14485) Values map was not initialized, leading to error 500 on submission of initial configuration Co-authored-by: 6543 <6543@obermui.de> --- modules/middlewares/flash.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/middlewares/flash.go b/modules/middlewares/flash.go index 38217288e8..732e1c76ea 100644 --- a/modules/middlewares/flash.go +++ b/modules/middlewares/flash.go @@ -27,6 +27,9 @@ type Flash struct { } func (f *Flash) set(name, msg string, current ...bool) { + if f.Values == nil { + f.Values = make(map[string][]string) + } isShow := false if (len(current) == 0 && FlashNow) || (len(current) > 0 && current[0]) {