From 0ee745919304f12dfd64a6151a40b6f5bc51d9cd Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Thu, 17 Mar 2016 14:14:56 +0100 Subject: Add guard --- authorize.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/authorize.go b/authorize.go index e3a0837..c6ea6d6 100644 --- a/authorize.go +++ b/authorize.go @@ -26,6 +26,9 @@ const IdentDNS IdentType = "dns" func (a Authorization) Supported(sols Solvers) []Challenge { supported := func(com []int) bool { for _, n := range com { + if n < 0 || n >= len(a.Challenges) { + return false + } if _, ok := sols[a.Challenges[n].Type]; !ok { return false } -- cgit v1.2.3