fix: upgrade golang.org/x/crypto for security

This commit is contained in:
krau
2025-11-22 17:43:52 +08:00
parent 7d57ad30a9
commit 2c5d6f0e57
3 changed files with 8 additions and 4 deletions

View File

@@ -68,8 +68,8 @@ func (t *Telegram) Save(ctx context.Context, r io.Reader, storagePath string) er
if err := t.limiter.Wait(ctx); err != nil {
return fmt.Errorf("rate limit failed: %w", err)
}
rs, ok := r.(io.ReadSeeker)
if !ok || rs == nil {
rs, seekable := r.(io.ReadSeeker)
if !seekable || rs == nil {
return fmt.Errorf("reader must implement io.ReadSeeker")
}
tctx := tgutil.ExtFromContext(ctx)