diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-11-30 01:19:35 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-11-30 01:19:35 -0800 |
commit | 5527117e706114c1188afaa10188d96170874047 (patch) | |
tree | c52bd4adcf2a8764e5bc6586133f5f4b66029444 /system/db/config.go | |
parent | 8f3eb3a9e3e267ff66f292a4b654c237d31a03de (diff) |
checking bounds on config field slice
Diffstat (limited to 'system/db/config.go')
-rw-r--r-- | system/db/config.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/db/config.go b/system/db/config.go index 92c732e..6855081 100644 --- a/system/db/config.go +++ b/system/db/config.go @@ -57,7 +57,7 @@ func SetConfig(data url.Values) error { } // check for "invalidate" value to reset the Etag - if cfg.CacheInvalidate[0] == "invalidate" { + if len(cfg.CacheInvalidate) > 0 && cfg.CacheInvalidate[0] == "invalidate" { cfg.Etag = NewEtag() cfg.CacheInvalidate = []string{} } |