Fix incoming status creation date not being restricted to standard ISO8601 (#27655)
This commit is contained in:
parent
6712bf86cd
commit
c0989b78f8
2 changed files with 45 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue