Commit Graph

60 Commits

Author SHA1 Message Date
Diogo Cordeiro 7b6c887d76 OStatus plugin - Merge some bug fixes by XRevan86 2019-04-20 23:27:46 +01:00
Mikael Nordfeldth f4d6710a0f Change mentions of PuSH to WebSub
WebSub is probably finalised before we make a release anyway. Here is
the official spec: https://www.w3.org/TR/websub/

Mostly just comments that have been changed. Some references to PuSH <0.4
are left because they actually refer to PuSH 0.3 and that's not WebSub...

The only actual code change that might affect anything is FeedSub->isPuSH()
but the only official plugin using that call was FeedPoller anyway...
2017-05-01 11:04:27 +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 c19f87f867 fixes issue #189 with a script lacking exception handling 2016-06-24 15:19:24 +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 a93c69d150 OStatus update profile data script fixes 2016-03-28 15:42:41 +02:00
Mikael Nordfeldth 1f01356076 Fix issue #127 by catching exceptions
update-profile-data.php threw exceptions on http connection issues
2016-02-04 12:06:35 +01:00
Mikael Nordfeldth 8ab98b72ac getLeaseRemaining for FeedSub too 2016-01-13 20:01:00 +01:00
Mikael Nordfeldth e75472f460 Use the upstream function to get effectiveUrl 2016-01-13 14:00:05 +01:00
Mikael Nordfeldth 65184782aa OStatus usage of static Validate::* calls fixed 2015-11-08 10:33:41 +01:00
Mikael Nordfeldth 2970333adb Set otherwise undiscovered salmonuri on OStatus script update-profile.php 2015-10-04 17:21:56 +02:00
Bhuvan Krishna 1ab4c9998a Add executable permission to script missing it 2015-07-10 14:46:08 +05:30
Mikael Nordfeldth b63054cb1d OStatus update-profile.php script now finds Diaspora salmon URLs 2015-06-06 16:18:22 +02:00
Mikael Nordfeldth f141565104 Allow delete-inactive for gcfeeds
Garbage collecting should also allow to clean up leftover database entries.
2015-02-04 16:49:03 +01:00
Mikael Nordfeldth cc996f58db Test in Ostatus_profile if avatar is an image before writing to filesystem
This clears one FIXME...

We also fix HTTPClient::quickGet() (and a related call in OStatus testfeed.php).
2015-01-27 14:00:39 +01:00
Mikael Nordfeldth 697a00d8e1 Force updateAvatar if desired 2015-01-26 17:26:51 +01:00
Mikael Nordfeldth 3a0136fe1f Replace file_get_contents with HTTPClient in testfeed 2015-01-22 11:30:36 +01:00
Mikael Nordfeldth 0499736bb4 Loose_Ostatusprofile::updateAvatar was identical to Ostatus_profile 2015-01-18 02:39:08 +01:00
Joshua Judson Rosen f71eeaee5a OStatus/scripts/update-profile-data.php: print updated fullnames
Now that we can actually update them again.
2014-12-08 22:06:29 -05:00
Mikael Nordfeldth c74dc15173 DiscoveryHints gets microformats2 parsing abilities 2014-06-24 01:27:03 +02:00
Mikael Nordfeldth 228dc1f851 Ostatus_profile throws NoProfileException from localProfile()
Some implementations of the exception handling is included here,
the actions come in a later commit.
2014-05-19 17:59:36 +02:00
Mikael Nordfeldth 074b2b621c Garbage collection script didn't loop through anything 2014-05-06 16:18:47 +02:00
Mikael Nordfeldth c279a33feb More Exceptions for FeedSub doSubscribe and related functions
Now also garbageCollect will now throw exceptions of failures of all kinds
and only reply true/false on entirely successful runs of sub/unsub.
2014-05-06 15:40:57 +02:00
Mikael Nordfeldth 5fd6053220 Code cleanup and enabling User object's etc. getUri() 2014-04-28 14:08:42 +02:00
Mikael Nordfeldth ab4113168f PuSH 0.4: No outgoing 'sync' verifications. Feed renewal script. No auto-renewal.
Among other things (such as permanent subscriptions), Pubsubhubbub 0.4
removed the "sync" verification method. This means that any incoming
PuSH subscription requests that follow the 0.4 spec won't really
_require_that we handle it as a background process, but if we were to
try direct verification of the subscription - and fail - there's no way
we could  pick up the ball again. So _essentially_ we require background
processing with retries.

This means we must implement something like the "poorman cron" or
similar, so background processing can be handled
on-demand/on-site-visit. This is how Friendica, Drupal etc. handles it
and is necessary for environments where we can't run separate queue
daemons.

When the poorman-cron-ish thing is implemented, auto-renewal will work
for all users.

PuSH 0.4 spec:
    https://pubsubhubbub.googlecode.com/git/pubsubhubbub-core-0.4.html
More on PuSH 0.4 release (incl. breaking changes):
    https://groups.google.com/forum/#!msg/pubsubhubbub/7RPlYMds4RI/2mIHQTdV3aoJ
2013-11-02 20:02:28 +01:00
Mikael Nordfeldth 7ddd561837 Salmon only has one "rel" value now, so start deprecating 2013-11-01 17:00:12 +01:00
Mikael Nordfeldth fcba540a14 Removed legacy OMB. Use OStatus for remote profiles. 2013-10-28 16:22:09 +01:00
Mikael Nordfeldth ba481d1e31 LOG_WARNING, not LOG_WARN 2013-10-06 01:33:10 +02:00
Mikael Nordfeldth a0e107f17f Implemented WebFinger and replaced our XRD with PEAR XML_XRD
New plugins:
* LRDD
    LRDD implements client-side RFC6415 and RFC7033 resource descriptor
    discovery procedures. I.e. LRDD, host-meta and WebFinger stuff.

    OStatus and OpenID now depend on the LRDD plugin (XML_XRD).

* WebFinger
    This plugin implements the server-side of RFC6415 and RFC7033. Note:
    WebFinger technically doesn't handle XRD, but we serve both that and
    JRD (JSON Resource Descriptor), depending on Accept header and one
    ugly hack to check for old StatusNet installations.

    WebFinger depends on LRDD.

We might make this even prettier by using Net_WebFinger, but it is not
currently RFC7033 compliant (no /.well-known/webfinger resource GETs).

Disabling the WebFinger plugin would effectively render your site non-
federated (which might be desired on a private site).

Disabling the LRDD plugin would make your site unable to do modern web
URI lookups (making life just a little bit harder).
2013-09-30 22:04:52 +02:00
Mikael Nordfeldth 63306081bc Subscription "get by" functions now don't use ArrayWrappers
They were getting in the way of some strict-typing stuff.
2013-09-21 18:38:14 +02:00
Mikael Nordfeldth 2a4dc77a63 The overloaded DB_DataObject function staticGet is now called getKV
I used this hacky sed-command (run it from your GNU Social root, or change the first grep's path to where it actually lies) to do a rough fix on all ::staticGet calls and rename them to ::getKV

   sed -i -s -e '/DataObject::staticGet/I!s/::staticGet/::getKV/Ig' $(grep -R ::staticGet `pwd`/* | grep -v -e '^extlib' | grep -v DataObject:: |grep -v "function staticGet"|cut -d: -f1 |sort |uniq)

If you're applying this, remember to change the Managed_DataObject and Memcached_DataObject function definitions of staticGet to getKV!

This might of course take some getting used to, or modification fo StatusNet plugins, but the result is that all the static calls (to staticGet) are now properly made without breaking PHP Strict Standards. Standards are there to be followed (and they caused some very bad confusion when used with get_called_class)

Reasonably any plugin or code that tests for the definition of 'GNUSOCIAL' or similar will take this change into consideration.
2013-08-18 13:13:56 +02:00
Jean Baptiste Favre 246e840dd3 Fix INSTALLDIR constant definition. 2013-06-15 15:20:19 +02:00
Evan Prodromou 5b6ecef24b script to gc all feeds 2012-01-27 16:12:54 -05:00
Evan Prodromou c5d332f40a move yet-another-rediscover-script to OStatus plugin 2011-09-07 16:56:38 -04:00
Zach Copley 43f542c3a2 Script to delete bad OStatus hub URIs (until we have better error handling for broken hubs) 2011-04-12 02:29:02 -07:00
Brion Vibber 9ad00f726f Add unsubscribe option to resub-feed.php 2011-03-02 12:49:37 -08:00
Brion Vibber c92358fa7b add --all and --suspicious options for update-profile-data.php 2011-02-11 12:23:03 -08:00
Brion Vibber f30744c7c5 refactor for multi.... 2011-02-11 12:13:33 -08:00
Brion Vibber f7b431d60b woops 2011-02-11 12:08:35 -08:00
Brion Vibber 91535365b3 Work in progress: update-profile-data.php to update ostatus profile info from the current feed 2011-02-11 11:55:23 -08:00
Brion Vibber 458f93bddd OStatus fixup-shadow.php: add check for user_group entries with 'uri' entry shadowing an actual local_group -- this can cause trouble now that we sometimes actually use the uri field for lookups, and leaving the entries around would break updating the table to fill out formerly missing uris, since the unique index entry would already be taken by the bad entry. 2010-10-07 11:26:07 -07:00
Brion Vibber 5dee862b2c Fix broken code in OStatus feed maint/test scripts (using field name from older dev code, would load up wrong record) 2010-10-04 10:27:03 -07:00
Brion Vibber 4e5a69ad6f Enhanced OStatus fixup-shadow.php cleanup script to check for direct matches against user.uri and user_group.uri (for local groups). This should catch cases that were missed before because we were only doing pattern-matching checks, and the pattern didn't match because the site has been renamed and the old URI no longer matches the current domain / path structure.
Could use some more thorough testing in practice!
2010-09-28 07:45:38 -07:00
Siebrand Mazeland 1bfbe9badf * i18n/L10n updates and FIXMEs added
* whitespace fixes
2010-09-03 01:35:04 +02:00
Evan Prodromou a507f04bc4 fix incorrect function name in updateostatus.php script 2010-08-25 12:32:10 -04:00
Brion Vibber 9a53be4669 Initial support for third-party fallback hub such as Superfeedr for feed subscriptions.
If set up, this hub will be used to subscribe to feeds that don't specify a hub of their own.
Assumes that the fallback hub will, in fact, handle polling and updates for any feed we throw at it!
Authentication may be specified for the fallback hub.

Example:

  $config['feedsub']['fallback_hub'] = 'https://superfeedr.com/hubbub';
  $config['feedsub']['hub_user'] = 'abcd';
  $config['feedsub']['hub_pass'] = 'ckcmdkmckdmkcdk';

Also:
* Fix for WordPress-RSS-via-Superfeedr-Atom; if we have <author> info but no ID from a native ActivityStreams actor, don't freak out in the low-level processing code that checks for identity matches.
* enhanced messages for low-level FeedSub exceptions if they make it to outside display
2010-08-10 12:57:40 -07:00
Brion Vibber 9c8052e755 Rerun feed discovery and update the feed, salmon, and hub for the given OStatus remote profile. Restarts subscription fresh as well.
update-profile.php -sexample.com http://example.com/path/to/profile/url
2010-04-23 12:54:31 -07:00
Brion Vibber fd9d520aeb OStatus: CLI script to force a renewal on the given PuSH subscription. May help when we get out of sync with the hub.
php plugins/OStatus/scripts/resub-feed.php -smysite http://example.com/some/atom/feed
2010-04-22 06:14:40 +02:00
Brion Vibber dbaa93d1aa Clean up and clarify output on fix-shadow.php 2010-04-05 11:21:17 -07:00
Brion Vibber 79ec565104 Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing 2010-03-19 15:29:00 -07:00