Files
seaweedfs/weed/iam
Chris Lu 00c37387db refactor(sts): add explicit zero-time expiration handling
Improved defensive programming in IsExpired() methods:

1. Credentials.IsExpired():
   - Added explicit check for zero-time expiration (time.Time{})
   - Treats uninitialized credentials as expired
   - Prevents accidentally treating uninitialized creds as valid

2. SessionInfo.IsExpired():
   - Added same explicit zero-time check
   - Treats uninitialized sessions as expired
   - Protects against bugs where sessions might not be properly initialized

This is important because time.Now().After(time.Time{}) returns true,
but explicitly checking for zero time makes the intent clear and helps
catch initialization bugs during code review and debugging.
2026-01-02 21:20:05 -08:00
..
2025-08-30 11:15:48 -07:00
2025-11-12 22:14:50 -08:00
2025-08-30 11:15:48 -07:00
2025-11-12 22:14:50 -08:00