Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/doco-cd/handler_poll.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func RunPoll(ctx context.Context, pollConfig config.PollConfig, appConfig *confi
return append(results, pollResult{Metadata: metadata, Err: err})
}

externalRepoPath, err := filesystem.VerifyAndSanitizePath(filepath.Join(dataMountPoint.Destination, repoName), dataMountPoint.Destination) // Path on the host
externalRepoPath, err := filesystem.VerifyAndSanitizePath(filepath.Join(dataMountPoint.Source, repoName), dataMountPoint.Source) // Path on the host
if err != nil {
pollError(jobLog, metadata, fmt.Errorf("failed to verify and sanitize external filesystem path: %w", err))

Expand Down
2 changes: 1 addition & 1 deletion cmd/doco-cd/handler_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func HandleEvent(ctx context.Context, jobLog *slog.Logger, w http.ResponseWriter
return
}

externalRepoPath, err := filesystem.VerifyAndSanitizePath(filepath.Join(dataMountPoint.Destination, repoName), dataMountPoint.Destination) // Path on the host
externalRepoPath, err := filesystem.VerifyAndSanitizePath(filepath.Join(dataMountPoint.Source, repoName), dataMountPoint.Source) // Path on the host
if err != nil {
onError(w, jobLog.With(logger.ErrAttr(err)), "failed to verify and sanitize external filesystem path", err.Error(), http.StatusBadRequest, metadata)

Expand Down