Commit Graph

361 Commits

Author SHA1 Message Date
Mikael Nordfeldth
598b51eb7a Escaping a URI in common_debug call 2017-04-27 09:23:45 +02:00
Mikael Nordfeldth
54971842f2 A bit more instructive debugging 2017-04-22 10:55:24 +02:00
Mikael Nordfeldth
e98bceec10 Import backlog on new subscription.
Danger is when importing a new feed that may be maliciously crafted
to contain a zillion entries.
2017-04-21 09:31:27 +02:00
Mikael Nordfeldth
f51cb6fca9 Split OStatusPlugin FeedSub receive into two parts
FeedSub::receive now only handles the PuSH verification
FeedSub::receiveFeed is protected and only parses+imports feed XML
2017-04-21 08:13:39 +02:00
Mikael Nordfeldth
35b0a9e3ae Handle normalized acct: URIs in ostatussub
Mastodon sent the proper acct: URI and not just 'user@domain' when
using the remote subscribe functionality.
2017-04-16 11:01:16 +02:00
Mikael Nordfeldth
6bfc97c95d Less spammy logs 2016-10-22 23:24:13 +02:00
Mikael Nordfeldth
6ebc5f0bff some debugging calls and make sure $hints['feedurl'] gets set with $feeduri in case that variable is used. 2016-10-22 23:08:44 +02:00
Mikael Nordfeldth
a833eaa651 Make all hash algorithms available (but whitelist by default)
sha1 is whitelisted only because StatusNet requires it.
2016-06-28 11:54:39 +02:00
Mikael Nordfeldth
ad7ebd1a8c Even more phpseclib update related stuff. 2016-06-25 20:34:28 +02:00
Mikael Nordfeldth
d0c26fb1a4 URIFIX in Ostatus_profile, handle missing feedsub 2016-06-25 11:59:31 +02:00
Mikael Nordfeldth
3a8ce99a9d Magicsig call for phpseclib\Math\BigInteger fixed 2016-06-17 23:47:00 +02:00
Mikael Nordfeldth
1839082f95 OStatus Magicsig adaptations to new phpseclib
Some constants have changed and the way to call RSA->sign(...) too.
2016-06-17 23:43:24 +02:00
Mikael Nordfeldth
a1d064129a Handle namespaces for new phpseclib 2016-06-17 23:21:34 +02:00
Mikael Nordfeldth
d4041a4a1f a little bit more explicit logging 2016-03-28 16:41:29 +02:00
Mikael Nordfeldth
16517f019a Embarrasing copy-paste gone too fast 2016-03-28 16:25:29 +02:00
Mikael Nordfeldth
7bef2ad4cc Update Profile Data script fixes, might work for groups too now 2016-03-28 16:19:47 +02:00
Mikael Nordfeldth
7be4641040 Actually return an Ostatus_profile 2016-03-27 14:54:14 +02:00
Mikael Nordfeldth
0767bf487e Use the new onUpdateKeys in dataobject for tasks on-update of keys
sets the hashkey column of the row to sha1(topic + '|' + callback)
2016-03-23 15:22:34 +01:00
Mikael Nordfeldth
12f1707a74 Ostatus_source filled no purpose whatsoever 2016-02-26 22:37:26 +01:00
Mikael Nordfeldth
422d475e44 Differentiate two similar log warning messages 2016-02-17 21:57:52 +01:00
Mikael Nordfeldth
a5c1b063fd isPerson did not exist for Ostatus_profile 2016-01-29 16:15:06 +01:00
Mikael Nordfeldth
689e277c62 Allow @localuser@mysite.example to be looked up as a mention 2016-01-29 16:06:16 +01:00
Mikael Nordfeldth
efe23ed404 updateWithKeys now understands multi-column keys
and automatically identifies _which_ columns are the right ones,
so for example 'uri' primary keys don't need to be explicitly set
2016-01-28 16:42:59 +01:00
Mikael Nordfeldth
fa8e02b832 Handle exceptions when salmon slapping
Make it so notifyDeferred actually _always_ throws exceptions and handle
them in the places it is called.
2016-01-20 14:56:24 +01:00
Mikael Nordfeldth
c559b8ce2a bulkDistribute won't add empty lists to database 2016-01-16 17:34:27 +01:00
Mikael Nordfeldth
2b67b53112 In very specific circumstances we can bulkDistribute 0 notices
Seems to be what caused an infinite loop on quitter.es, or I guess so anyway.
2016-01-16 17:18:14 +01:00
Mikael Nordfeldth
59e75ef966 Incorrect use of getByHashKey in HubSub 2016-01-14 13:15:31 +01:00
Mikael Nordfeldth
bacd49a6a8 Don't try to replace http with https if https already exists 2016-01-14 13:06:37 +01:00
Mikael Nordfeldth
0482b7de8e Debugging by indexing callback column in HubSub 2016-01-13 22:57:42 +01:00
Mikael Nordfeldth
8ab98b72ac getLeaseRemaining for FeedSub too 2016-01-13 20:01:00 +01:00
Mikael Nordfeldth
377947c57f s/getLease/getLeaseTime/ just to be a bit more clear 2016-01-13 19:55:17 +01:00
Mikael Nordfeldth
1d26fedf12 Don't store lease seconds, just sub start and end
The seconds can always be calculated from the dates!
2016-01-13 19:45:20 +01:00
Mikael Nordfeldth
494746e665 Minor PuSH comment and debug stuff 2016-01-13 19:25:39 +01:00
Mikael Nordfeldth
a5fd4fde25 Request a month long sub lease by default 2016-01-13 19:24:07 +01:00
Mikael Nordfeldth
b38a789005 HubSub didn't save sub start and end datetimes 2016-01-13 19:23:34 +01:00
Mikael Nordfeldth
e75472f460 Use the upstream function to get effectiveUrl 2016-01-13 14:00:05 +01:00
Mikael Nordfeldth
f4feef477b Don't follow redirects on PuSH POST. 2016-01-12 14:32:28 +01:00
Mikael Nordfeldth
c826fe0af4 $target was klantigtly copied from another debug message 2016-01-11 20:10:38 +01:00
Mikael Nordfeldth
bd6efa0e45 Update PuSH callback URL if remote side switched to HTTPS
See the comment in the source on why we're not following Location headers...
2016-01-11 19:55:02 +01:00
Mikael Nordfeldth
4e0ed61f7c OStatus queue handler uses Notice->getAttentionProfiles()
and lots more debugging for LOG_DEBUG
2016-01-08 01:31:47 +01:00
Mikael Nordfeldth
3471213d1c processFeed would abort on certain errors where findLocalObject failed 2016-01-05 15:00:07 +01:00
Mikael Nordfeldth
f6df44ea85 Handle feed imports with exceptions better 2015-12-31 15:05:35 +01:00
mmn
0baa9debbc Merge branch 'direct-feed-sub' into 'master'
If we are given a direct URL to a feed, use that



See merge request !54
2015-12-14 21:09:56 +00:00
Mikael Nordfeldth
7ccd36849e Merge branch 'master' of git.gnu.io:gnu/gnu-social into nightly
Conflicts:
	plugins/OStatus/OStatusPlugin.php

master vs. nightly thing
2015-11-05 16:16:02 +01:00
mmn
f345f1d605 Merge branch 'renew-pshb' into 'master'
Actually use the renew code

We have the code to check once a day and renew, but currently it's
just in a script directory.  This change adds an event listener
hook to check and renew subscriptions daily.

Closes #83

See merge request !38
2015-11-05 15:13:16 +00:00
Mikael Nordfeldth
c950f18546 Merge branch 'master' into nightly
Some merge requests that were aimed at master
2015-11-05 16:07:05 +01:00
mmn
45b24286e5 Merge branch 'status-204' into 'master'
Accept 204 for PuSH subscription

Some hubs (notably, pushpress, used by wordpress.com) return 204 to mean success.

This used to be allowed by the spec, so no harm in accepting it.

See merge request !48
2015-11-05 15:03:42 +00:00
Stephen Paul Weber
e58c529c53 If we are given a direct URL to a feed, use that 2015-10-28 00:54:20 +00:00
Stephen Paul Weber
e1de6e0aa9 Support more author types on RSS
Specifically, any ActivityStreams or ATOM namespaces being used on
an rss channel.
2015-10-27 18:43:57 +00:00
Stephen Paul Weber
4c2bc465a0 Accept 204 for PuSH subscription
Some hubs (notably, pushpress, used by wordpress.com) return 204 to mean success.

This used to be allowed by the spec, so no harm in accepting it.
2015-10-27 03:16:39 +00:00