From 29547ce8aba63454e84d277b0597fb2764e8cb23 Mon Sep 17 00:00:00 2001 From: kim Date: Mon, 3 Nov 2025 21:16:42 +0100 Subject: [bugfix] more RSS validation issues (#4517) Fixes some validation issues relating to author information often expected to be valid email addresses, which our @displayname@username is not. There's still a few more validation issues, but honestly if we're going have better support I think it might be worth dropping gorilla/feeds for our own tagged XML / JSON structs. Also does a bunch of housekeeping in the typeutils package removing error returns where never used / only ever logged, removing unused contexts etc. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4517 Co-authored-by: kim Co-committed-by: kim --- internal/web/rss.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/web/rss.go') diff --git a/internal/web/rss.go b/internal/web/rss.go index 7fe941320..95f2a9a44 100644 --- a/internal/web/rss.go +++ b/internal/web/rss.go @@ -232,14 +232,14 @@ func unixAfter(t1 time.Time, t2 time.Time) bool { // If no time was provided, or the provided time was // not parseable, it will return a zero time. func extractIfModifiedSince(r *http.Request) time.Time { - imsStr := r.Header.Get(ifModifiedSinceHeader) - if imsStr == "" { + val := r.Header.Get(ifModifiedSinceHeader) + if val == "" { return time.Time{} // Nothing set. } - ifModifiedSince, err := http.ParseTime(imsStr) + ifModifiedSince, err := http.ParseTime(val) if err != nil { - log.Errorf(r.Context(), "couldn't parse %s value '%s' as time: %q", ifModifiedSinceHeader, imsStr, err) + log.Errorf(r.Context(), "couldn't parse %q as time: %v", val, err) return time.Time{} } -- cgit v1.2.3