Change condition to fail if the length is not the expected.
This commit is contained in:
parent
cf07c8f4c0
commit
54d0186d1f
1 changed files with 1 additions and 1 deletions
|
@ -241,7 +241,7 @@ func (p *Azure) AuthorizeSign(token string) ([]SignOption, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
re := azureXMSMirIDRegExp.FindStringSubmatch(claims.XMSMirID)
|
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)
|
return nil, errors.Errorf("error parsing xms_mirid claim: %s", claims.XMSMirID)
|
||||||
}
|
}
|
||||||
group, name := re[2], re[3]
|
group, name := re[2], re[3]
|
||||||
|
|
Loading…
Reference in a new issue