Explorar el Código

Change condition to fail if the length is not the expected.

Mariano Cano hace 7 años
padre
commit
54d0186d1f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      authority/provisioner/azure.go

+ 1 - 1
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]