Extract safecsv writer for spreadsheet-safe exports
Wrap encoding/csv with formula-safe cell sanitization and use it from log export streaming. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
@@ -22,7 +22,6 @@ package iam
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/csv"
|
||||
"fmt"
|
||||
"io"
|
||||
"strings"
|
||||
@@ -35,6 +34,7 @@ import (
|
||||
"go.probo.inc/probo/pkg/filemanager"
|
||||
"go.probo.inc/probo/pkg/gid"
|
||||
"go.probo.inc/probo/pkg/mail"
|
||||
"go.probo.inc/probo/pkg/safecsv"
|
||||
)
|
||||
|
||||
type LogExportService struct {
|
||||
@@ -228,7 +228,7 @@ func (s *LogExportService) streamCSV(
|
||||
return fmt.Errorf("cannot load organization for log export: %w", err)
|
||||
}
|
||||
|
||||
w := csv.NewWriter(pw)
|
||||
w := safecsv.NewWriter(pw)
|
||||
|
||||
switch exportJob.Type {
|
||||
case coredata.ExportJobTypeAuditLog:
|
||||
|
||||
Reference in New Issue
Block a user