mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 00:08:46 +00:00
Fix incoming status creation date not being restricted to standard ISO8601 (#27655)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user