Commit Graph

177 Commits

Author SHA1 Message Date
Evan Prodromou
a3c08faddd Erroneous code ensuring Webfinger accounts
Ostatus_profile::ensureProfileURI() was accidentally falling through to
the default switch case, and was also calling common_log() incorrectly.
2011-01-17 17:32:44 -05:00
Brion Vibber
51d1535f15 Added doc comments on Salmon magicsig-related stuff to help in figuring out what's going on 2011-01-05 14:05:59 -08:00
Evan Prodromou
67bde86f7c accept bookmarks over PuSH 2010-12-23 09:42:42 -08:00
Evan Prodromou
9a6ceb3303 Merge branch 'righttoleave' into 0.9.x 2010-12-22 11:22:51 -08:00
Brion Vibber
b83e7005ed Merge branch 'master' of gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
	plugins/OStatus/classes/FeedSub.php
2010-12-20 14:23:15 -08:00
Brion Vibber
46123e3754 *cough* don't commit the code that breaks your code that you used to test the debug code :D 2010-12-20 13:06:58 -08:00
Brion Vibber
a4e2f38356 Slightly fancier debug code for PuSH hmac mismatches -- save the post to a temp file if feedsub/debug is on in config. 2010-12-20 13:05:17 -08:00
Brion Vibber
dd48bdb1c4 Logging helper for bogus hmacs on PuSH in -- record the url & hub with the err msg to help tell what broke 2010-12-20 10:48:02 -08:00
Brion Vibber
c71d701a3f Logging helper for bogus hmacs on PuSH in -- record the url & hub with the err msg to help tell what broke 2010-12-20 10:46:23 -08:00
Evan Prodromou
16fc5314fb move code to get an author object for a feed to a library from Ostatus_profile 2010-12-17 13:09:37 -05:00
Brion Vibber
0330bad688 Cleaner code to avoid a couple PHP notices from accessing uninitialized variables in ostatus profile discovery (these cases hit checking diaspora accounts) 2010-12-15 12:14:25 -08:00
Siebrand Mazeland
973a48bded i18n/L10n fixes and translator documentation addded/updated. 2010-11-02 23:48:36 +01:00
Brion Vibber
5a9bb0adc4 Tossing in a basic i18n message export to script code. Plugins can hook StartScriptMessage/EndScriptMessage, or directly add needed mappings in Action::getScriptMessages(). Exported entries are accessible as SN.msg(key) at runtime.
StatusNet core code now sets the tooltip text on .attachment.more links when they receive their attachment-expansion magic; this will override the hardcoded tooltip text saved from OStatus plugin when displaying timelines in the web UI.
2010-11-02 13:05:16 -07:00
Brion Vibber
bca215563f Clean up remote avatar temporary files if we fail before saving them into avatars directory (OMB core, OStatus, WikiHowProfile, YammerImport) 2010-10-13 11:10:04 -07:00
Brion Vibber
69b13cb279 Normalize execution guards on OStatus php files; mostly helps cut down on annoying 'class not found' errors when something spiders the dirs. :P 2010-10-08 10:42:59 -07:00
Brion Vibber
1acc7d66c6 Always specify UTF-8 targt charset for html_entity_decode(); default is 8-bit ISO-8859-1 which causes things to break when we later pass them through things that expect to work with UTF-8. For instance, running through preg_replace() with the /u option results in NULL, leading to problems with OStatus and SubMirror generating their plaintext versions and doing length-cropping. 2010-09-30 11:29:31 -07:00
Evan Prodromou
b5cfcba471 Merge branch '0.9.x' into activityexport
Conflicts:
	plugins/OStatus/OStatusPlugin.php
2010-09-22 10:45:34 -04:00
Evan Prodromou
f7ec40fa42 make some static functions public for OStatus_profile 2010-09-21 06:13:19 -04:00
Siebrand Mazeland
5a6f616206 * i18n/L10n update
* translator comments added
* remove superfluous whitespace
2010-09-19 15:17:36 +02:00
Brion Vibber
097d0bd2fa Ticket #2731: Fix for regression in posting to remote groups (regression in 2d4e0693c8)
Changes in 2d4e0693c8 changed Ostatus_profile::filterReplies() (which sorts out the local, remote, and group recipients on incoming remote messages) from checking for remote profiles with a safe call to Ostatus_profile::staticGet() to calls through Ostatus_profile::ensureProfileURL() and Ostatus_profile::ensureWebfinger(), which throw exceptions and thus abort processing.
Since this was done before checking for local groups, the filter would fail when the ensure* functions determined it was looking at a local group and rightfully refused to create a remote group profile for it.

Changing the calls to the ensure* functions was done so we can record remote reply recipients for future reply-to-reply processing (the staticGet() call was a cheaper way to do a lookup when we knew we only actually had to process groups that somebody signed up to); most important fix is simply to actually check for the exception! :)

Here I'm changing the order of processing so we do the local group lookup first -- where it's nice and safe -- and then when we do the remote checks, we'll go ahead and gracefully skip that entry if the full remote lookup fails, so we'll still process any following recipients.
2010-09-16 14:43:27 -07:00
Brion Vibber
f2574fdd01 Fix for #2663: fix for original/96px-size avatars getting saved with bad permissions, causing failure to see images if background queues are different user from web server.
The original-size file is now forced to 0644 (all-readable), which should help. Not sure this is 100% ideal, but it's better than 0600!
(The other sizes were being created in other code and had sane read perms already.)

Watch out for similar issues in Twitter bridge etc; avatar import code should get cleaned up and consolidated.
2010-09-07 16:52:02 -07:00
Siebrand Mazeland
1bfbe9badf * i18n/L10n updates and FIXMEs added
* whitespace fixes
2010-09-03 01:35:04 +02:00
Evan Prodromou
82b1d6daef Merge branch 'swat0' into 0.9.x 2010-09-02 16:58:55 -04:00
Evan Prodromou
ab88123373 correctly return oprofile from Ostatus_profile::ensureProfileURI() 2010-09-01 17:05:11 -04:00
Evan Prodromou
2d4e0693c8 save URIs of remote profiles marked for attention 2010-09-01 16:17:18 -04:00
Brion Vibber
b77c029aa8 Merge branch 'testing'
Conflicts:
	plugins/OStatus/classes/Ostatus_profile.php
2010-08-16 10:06:52 -07:00
Evan Prodromou
926c77246b Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
	plugins/OStatus/classes/Ostatus_profile.php
2010-08-13 14:35:49 -07:00
Evan Prodromou
8dec16aeeb add hooks to allow plugins to handle different kinds of activities 2010-08-13 13:14:47 -07:00
Brion Vibber
16f75b95c6 Fixes for RSS subscriptions: accept posts with no ActivityStreams object-type set; be more liberal about accepting posts from feeds where the author info doesn't match (we'll post under the feed's profile and just not try to update the profile info). 2010-08-13 12:23:42 -07:00
Brion Vibber
185f18024a Fixes for RSS subscriptions: accept posts with no ActivityStreams object-type set; be more liberal about accepting posts from feeds where the author info doesn't match (we'll post under the feed's profile and just not try to update the profile info). 2010-08-13 11:41:44 -07:00
Brion Vibber
08fc6053ec Fix for regression with OStatus mention processing (duplicated new and old style lead to trying to save a reply entry twice). 2010-08-10 13:49:11 -07: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
7e55fc0044 OStatus/FeedSub: tweaked PuSH feed garbage collection so other plugins can declare usage of a low-level feed or an OStatus profile besides profile subscriptions & group memberships.
SubMirror: redid add-mirror frontend to accept a feed URL, then pass that on to OStatus, instead of pulling from your subscriptions.
Profile: tweaked subscriberCount() so it doesn't subtract 1 for foreign profiles who aren't subscribed to themselves; instead excludes the self-subscription in the count query.
Memcached_DataObject: tweak to avoid extra error spew in the DB error raising

Work in progress: tweaking feedsub garbage collection so we can count other uses
2010-08-06 11:49:52 -07:00
Brion Vibber
41e9dba729 OStatus plugin: Rolling batch queueing for PuSH output to >50 subscribing sites. Keeps latency down for other things enqueued while we work... 2010-06-07 10:03:43 -07:00
Brion Vibber
8b9436e8ae Option to divert PuSH items directly to the target site's queue when local 2010-06-03 18:06:55 -07:00
Evan Prodromou
a129c455a2 Fix exceptions with bad gravatar URLs 2010-04-21 18:19:16 -07:00
Brion Vibber
d352e5f5c4 Handle attempt to subscribe a local user via their remote webfinger reference more gracefully.
The ensure* family of functions will now return an OStatusShadowException in this case, which gives us a pleasant error message instead of a giant exception backtrace when you do 'sub somebody@this.local.server'.

Can be extended later to allow actually using the local profile, since we could figure it out.
2010-04-06 16:35:24 -07:00
Brion Vibber
6046a6cc6a Include meta charset header in saved HTML file for long OStatus messages; without, DOMDocument::loadHTML assumed Latin-1 instead of UTF-8. 2010-03-29 16:29:57 -07:00
James Walker
3227122ac3 move base64_url_(encode|decode) to static functions in Magicsig 2010-03-26 10:43:41 -07:00
Brion Vibber
e91bf2b8a9 Tweak to OStatus long message cropping: use original source notice URL for the link in the text version, don't shorten the link for the HTML so we can append params to it in JS.
Conflicts:

	plugins/OStatus/classes/Ostatus_profile.php
2010-03-25 16:08:09 -07:00
Brion Vibber
013647f0ba Add doc comments on saveHTMLFile; drop the extra <div> wrapping the contents to make it easier to extract without getting extra markup. 2010-03-25 23:11:06 +01:00
Sarven Capadisli
8336e24179 Using &#8230; (hellip) instead of "more" for link text 2010-03-25 22:18:21 +01:00
Brion Vibber
c11064a539 Updated 'more' anchor for attachments to do an XHR GET
Conflicts:

	lib/attachmentlist.php
	plugins/OStatus/classes/Ostatus_profile.php

Merge tried to delete things that it seems it shouldn't, very confusing order. Hope rest of the cherry-picking isn't a problem.
2010-03-25 14:15:54 -07:00
James Walker
9e0b9857f4 Make sure we're requiring the library 2010-03-24 15:26:03 -04:00
James Walker
cfca789b34 Updated Math_Biginteger from upstream - removing safe* workarounds 2010-03-24 15:18:41 -04:00
James Walker
c4273f0ef3 Check for 0.9.0 bad keys from old Crypt_RSA library 2010-03-24 15:15:20 -04:00
Zach Copley
5b0b6097e0 Fix reference. Look at the first ActivityObject in the list. 2010-03-22 21:48:21 -07:00
Zach Copley
b8e97ac709 Some initial media parsing
- Activity now returns a list of activity objects
- Processing of photo objects
2010-03-22 18:55:17 -07:00
Brion Vibber
27bfd1211d Math_BigInteger doesn't correctly handle serialization/deserialization for a value of 0, which can end up spewing notices to output and otherwise intefering with Salmon signature setup and verification when using memcached.
Worked around this with a subclass that fixes the wakeup, used for the stored 0 value in the subclassed Crypt_RSA.
2010-03-22 12:17:45 -07:00
Evan Prodromou
edee1fc09e ignore unrecognized object types 2010-03-22 08:17:14 -04:00