Skip to content

Commit

Permalink
Fix fixupTokenJson (#1890)
Browse files Browse the repository at this point in the history
* Microsoft mandatory file

* Fix fixupTokenJson

Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
Co-authored-by: Mohit Sharma <[email protected]>
Co-authored-by: Adam Orosz <[email protected]>
  • Loading branch information
4 people authored Oct 10, 2022
1 parent 65af689 commit e4f1c3e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/oauthTokenManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,11 @@ func fixupTokenJson(bytes []byte) []byte {
separatorString := `"not_before":"`
stringSlice := strings.Split(byteSliceToString, separatorString)

// OIDC token issuer returns an integer for "not_before" and not a string
if len(stringSlice) == 1 {
return bytes
}

if stringSlice[1][0] != '"' {
return bytes
}
Expand Down

0 comments on commit e4f1c3e

Please sign in to comment.