Use actual ISO8601 timestamps for masto API #425
No reviewers
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#425
Loading…
Reference in a new issue
No description provided.
Delete branch "darkkirb/akkoma:fix-invalid-datetime"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Some users post posts with spoofed timestamp, and some clients will have issues with certain dates. Tusky for example crashes if the date is any sooner than 1 BCE (“year zero” in the representation).
I limited the range of what is considered a valid date to be somewhere between the years 1583 and 9999 (inclusive).
The numbers have been chosen because:
this should probably be in the core object validation rather than an mrf
Okay so the more I read about this I am realizing that this is the intersection of a bunch of slightly different definitions of timestamps:
I think it would be more correct to put it in the Masto API code because currently akkoma is violating mastodon’s API constraints by passing invalid ISO8601 dates
18bcb5fd75
to2ce4f96f6e
Add MRF policy for fixing invalid publish datesto Use actual ISO8601 timestamps for masto APIOkay I moved the fix to the the commonapi code. This doesn’t fix the minor bug where year 0 is accepted internally and negative years are off by one year
Okay just swinging by and saying that this change might not actually fix the issue with tusky because "" isn't a valid iso8601 date either, will change that tomorrow
it's not perfect, but if it removes stuff that causes issues with client apps, that's all good
thanks a lot for looking into it!