0
0
Fork 0

Fix incoming status creation date not being restricted to standard ISO8601 (#27655)

This commit is contained in:
Claire 2023-11-06 10:28:14 +01:00 committed by GitHub
parent 6712bf86cd
commit c0989b78f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 6 deletions

View file

@ -53,7 +53,8 @@ class ActivityPub::Parser::StatusParser
end
def created_at
@object['published']&.to_datetime
datetime = @object['published']&.to_datetime
datetime if datetime.present? && (0..9999).cover?(datetime.year)
rescue ArgumentError
nil
end