From 54d0186d1f133aaa13f6af09b9068189a58aa551 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Mon, 13 May 2019 11:50:22 -0700 Subject: [PATCH] Change condition to fail if the length is not the expected. --- authority/provisioner/azure.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authority/provisioner/azure.go b/authority/provisioner/azure.go index 725d0b19..d0157bd0 100644 --- a/authority/provisioner/azure.go +++ b/authority/provisioner/azure.go @@ -241,7 +241,7 @@ func (p *Azure) AuthorizeSign(token string) ([]SignOption, error) { } re := azureXMSMirIDRegExp.FindStringSubmatch(claims.XMSMirID) - if len(re) == 0 { + if len(re) != 4 { return nil, errors.Errorf("error parsing xms_mirid claim: %s", claims.XMSMirID) } group, name := re[2], re[3]