Skip to content

Commit 30f4549

Browse files
committed
Prevent nil dereference when feeds without published dates are processed
1 parent b647a12 commit 30f4549

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## Unreleased
88

9+
## 0.4.2 - 2025-02-09
10+
### Fixed
11+
* Prevent nil dereference when feeds without published dates are processed
12+
913
## 0.4.1 - 2025-02-09
1014
### Changed
1115
* Feed fetching will reuse cached content within an hour of a previous fetch without checking for a HTTP 304 (Not Modified) from the remote resource

walrss/internal/rss/processor.go

+4
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ func filterFeedContent(st *state.State, feed *gofeed.Feed, feedID string) ([]*fe
268268

269269
for _, item := range feed.Items {
270270
if _, found := knownItems[item.GUID]; !found {
271+
if item.PublishedParsed == nil {
272+
item.PublishedParsed = &time.Time{}
273+
}
274+
271275
o = append(o, &feedItem{
272276
ID: item.GUID,
273277
Title: strings.TrimSpace(item.Title),

0 commit comments

Comments
 (0)