Commit Graph

15677 Commits

Author SHA1 Message Date
Mikael Nordfeldth
adf896bc12 Add support for plugins to resize images
This also adds an event hook to get more metadata of the ImageFile.
Such as if it's animated or so.
2014-06-05 13:29:36 +02:00
Mikael Nordfeldth
3f9a16dc58 Merge from chimo: Catch GeoCookie JSON parsing error 2014-06-05 09:33:30 +02:00
Mikael Nordfeldth
167740456b Show inline repeats-list in ThreadedNoticeList
Also, don't show repeats _as_ separate notices in the list either.
2014-06-05 00:59:49 +02:00
Mikael Nordfeldth
a900d04052 Non-dynamic fetching for multiple Notice properties 2014-06-05 00:29:43 +02:00
Mikael Nordfeldth
3d807c812d $notice->getProfile will ALWAYS return a Profile
otherwise it throws an exception
2014-06-05 00:07:04 +02:00
Mikael Nordfeldth
04d4b62dff Replies to repeats should go to the original 2014-06-04 23:51:32 +02:00
Mikael Nordfeldth
a490d634db Repeats were not delivered a conversation ID
Vinilox noticed that replies to repeats ended up outside of the original
notice's conversations.
2014-06-04 23:21:37 +02:00
Mikael Nordfeldth
90cc6b4d3b Notice::getReplyTo more specific now (getInlineReplyTo) 2014-06-04 23:20:20 +02:00
Mikael Nordfeldth
de53e74f40 Proper HTTP status codes for WebFinger search miss 2014-06-04 12:59:58 +02:00
Mikael Nordfeldth
6d0ac21185 Return 404 on resource-not-found for WebFinger 2014-06-04 12:46:06 +02:00
Mikael Nordfeldth
d350a20e1f Less verbose debugging (also don't log private keys)
Magicsig private keys were logged. That's probably not a good thing.
MagicEnvelope full XML entries no longer spam the log either.
2014-06-03 12:53:04 +02:00
Mikael Nordfeldth
aaef11077d Default of Magicsig keypair toString should be secure
Prevent crappy coders from leaking private keys.
2014-06-03 12:51:52 +02:00
Mikael Nordfeldth
629cbedee2 Dangerous non-dynamic profile fetching in Notice
For a Notice object with multiple results, ->getProfile() would ALWAYS
return the first profile in the list. For example our "popular notices"
stream ended up believing all notices were made by the same profile.
2014-06-03 12:22:07 +02:00
Mikael Nordfeldth
c99d4eddb1 Moved Poll CSS into the plugin directory 2014-06-03 11:38:40 +02:00
Mikael Nordfeldth
9a19588ac9 Moved QnA CSS into the plugin directory 2014-06-03 11:36:32 +02:00
Mikael Nordfeldth
e6dcb0c40e Moved Event CSS into the plugin directory 2014-06-03 11:34:39 +02:00
Mikael Nordfeldth
70cb488106 ActivityObject::fromProfile used some non-included class definitions 2014-06-03 03:18:13 +02:00
Mikael Nordfeldth
9a1109bd14 Revert "There were referenced in ActivityObject not autoloaded"
This reverts commit 6e35544a67.
2014-06-03 03:16:18 +02:00
Mikael Nordfeldth
a7531ca5c7 Moved Bookmark CSS into the plugin directory 2014-06-03 03:08:14 +02:00
Mikael Nordfeldth
1431bbd884 No need to pre-resize avatars 2014-06-03 01:52:42 +02:00
Mikael Nordfeldth
6e35544a67 There were referenced in ActivityObject not autoloaded 2014-06-03 01:33:48 +02:00
Mikael Nordfeldth
0bc122ff58 Magicsig::generate is now static
This also fixes a problem with "initial salmon slap", which was a
problem for newly registered accounts which would have their first
salmon slap fail to distribute since there was a problem with Magicsig
keys. Apparently we have to re-read them with importKeys so the
Crypt_RSA objects publicKey and privateKey match later instances of them.

I think it may have been that generate() doesn't specify a signatureMode,
but I leave experimentation of that to the future.
2014-06-02 21:50:40 +02:00
Mikael Nordfeldth
537dff7987 Salmon posts can only be made for local users. More typing!
Since we of course don't have the remote party's private keys anyway.

I made some small fixes in Magicsig class too, removing unnecessary code.
2014-06-02 19:46:42 +02:00
Mikael Nordfeldth
2cd25039af Quick-return is more comprehensible than long if statements 2014-06-02 19:37:06 +02:00
Mikael Nordfeldth
f7479e3f57 Prepare for WebFinger magicsig data for remote profiles 2014-06-02 19:33:09 +02:00
Mikael Nordfeldth
78805d113a MagicEnvelope discoverKeyPair now returns string
getKeyPair fills in missing data so it's a complete Magicsig.
We may use insert() here in the future so the Magicsig is cached locally.
2014-06-02 18:31:48 +02:00
Mikael Nordfeldth
d44588f98b Only use a Profile in MagicEnvelope keypair retrieval
So we _know_ there is a profile for the submitter we're about to verify.
2014-06-02 16:12:26 +02:00
Mikael Nordfeldth
56194b3cd9 Magicsig importKeys finetuning and getHash() use 2014-06-02 16:11:15 +02:00
Mikael Nordfeldth
dc52a8ff43 Don't ensureProfile before we verify signature 2014-06-02 16:10:26 +02:00
Mikael Nordfeldth
00b2bddc7c Clarify it's not base64, but base64url, encoding in Magicsig 2014-06-02 14:51:15 +02:00
Mikael Nordfeldth
993ad00333 Improve debugging for Salmon slaps 2014-06-02 14:20:58 +02:00
Mikael Nordfeldth
d534ea7bd6 Try the whole Salmon action for AlreadyFulfilledException
If we have already fulfilled the action, we don't have to send an error back.
2014-06-02 13:57:30 +02:00
Mikael Nordfeldth
c1dc13bef0 Magicsig warning message would fail to get bits 2014-06-02 13:35:29 +02:00
Mikael Nordfeldth
db443e9374 File::processNew now static and always throws exception on failure 2014-06-02 02:11:23 +02:00
Mikael Nordfeldth
d6f52f5939 File::processNew can return -1 which was not true for empty()
Also, File->getEnclosure() now throws exception if not enough metadata.
2014-06-02 01:46:09 +02:00
Mikael Nordfeldth
d596513e39 Stronger typing for NoticeListItem and so 2014-06-02 00:20:27 +02:00
Mikael Nordfeldth
49188e826c ArrayWrapper no longer returned from multiGetClass
multiGetClass uses FIND_IN_SET for ordering, which is pretty MariaDB specific.
2014-06-02 00:15:17 +02:00
Mikael Nordfeldth
3ef8322b03 There could be unresolvable FeedSub entries 2014-06-01 16:07:08 +02:00
Mikael Nordfeldth
2f97d5d206 Stronger typing in Widget class (HTMLOutputter) 2014-06-01 13:09:47 +02:00
chimo
8be96a7ebe Catches GeoCookie JSON parsing error 2014-05-31 18:11:04 -04:00
Mikael Nordfeldth
75711ae06a Magicsig is made a bit less cumbersome 2014-05-31 13:41:49 +02:00
Mikael Nordfeldth
411f3b86a4 Use locally cached Salmon keys for profiles
Please note that we're not yet actually caching them ourselves.
2014-05-31 12:51:51 +02:00
Mikael Nordfeldth
0c2134f9ad Last objectification of MagicEnvelope. Smarter SalmonAction 2014-05-31 12:00:46 +02:00
Mikael Nordfeldth
120e5c685a Template engine is a good idea, but not in that implementation 2014-05-31 00:37:58 +02:00
Mikael Nordfeldth
cc5aff5de3 StatusNet::delPlugin($name) added to disable plugins
Instead of setting some weird $config['plugins']['disable-Blah'] yourself.
The class name, StatusNet, will probably change in the future to GNU social.
No global function added, as it exists for addPlugin().
2014-05-31 00:27:23 +02:00
Mikael Nordfeldth
62e8081863 Maybe the least necessary plugin: PoweredByStatusNet 2014-05-31 00:04:02 +02:00
Mikael Nordfeldth
61116ea991 Subscription class listing retrieval fixed
The incorrect variable was tried to be 0 causing offset limits that
are more than 1 to be treated identically (like the raw $ids value).
2014-05-30 23:37:00 +02:00
Mikael Nordfeldth
eb7f964598 Modernising subscribers/subscriptions to use $this->scoped/target
They extend GalleryAction from ProfileAction, where $this->target is set.
2014-05-28 17:00:34 +02:00
Mikael Nordfeldth
9e6599b9fb Salmon log message tidying up 2014-05-28 14:07:47 +02:00
Mikael Nordfeldth
03fc02c26f Bad variable names (fixes last commit) 2014-05-27 13:02:26 +02:00