Skip to content

Commit

Permalink
Fix TTL shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
strideynet committed Dec 17, 2024
1 parent 5225a81 commit 20a4864
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/auth/machineid/workloadidentityv1/issuer_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ func (s *IssuanceService) IssueWorkloadIdentity(
// TODO(noah): Add more sophisticated control of the TTL.
ttl := time.Hour
if req.RequestedTtl != nil && req.RequestedTtl.AsDuration() != 0 {
ttl := req.RequestedTtl.AsDuration()
ttl = req.RequestedTtl.AsDuration()
if ttl > defaultMaxTTL {
ttl = defaultMaxTTL
}
Expand Down

0 comments on commit 20a4864

Please sign in to comment.