mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-17 04:32:15 +01:00
chore(libreoffice): silence a gosec G703 false positive on temp-file cleanup
This commit is contained in:
@@ -85,7 +85,7 @@ func resetCalcScrollPosition(ctx context.Context, logger *slog.Logger, inputPath
|
|||||||
|
|
||||||
_, err = dst.Write(out)
|
_, err = dst.Write(out)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
_ = os.Remove(dst.Name())
|
_ = os.Remove(dst.Name()) //nolint:gosec // G703: dst is from os.CreateTemp in the working directory, not a caller-controlled path
|
||||||
logger.WarnContext(ctx, fmt.Sprintf("reset calc scroll position: write sanitized file: %s; using the original file", err))
|
logger.WarnContext(ctx, fmt.Sprintf("reset calc scroll position: write sanitized file: %s; using the original file", err))
|
||||||
return inputPath
|
return inputPath
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user