Commit Graph

9351 Commits

Author SHA1 Message Date
Brion Vibber
1301877dfe OStatus discover fixes:
* Subscription::start was sometimes passing users instead of profiles to hooks, which broke OStatus subscription notifications; now normalizing to profiles for processing.
* H-card parsing would trigger a lot of PHP warnings and notices in hKit. Now suppressing warnings and notices for the duration of the call to keep them out of output when display_errors is on.
* H-card parsing would trigger a PHP fatal error if the source page was not well-formed XML and Tidy was not present on the system. Switched normalization to use the PHP DOM module which is always present, as we have no need for Tidy's extra features here.
* Trying to fetch avatars from Google profiles failed and triggered a PHP warning due to the relative URL not being resolved during h-card parsing. Now passing profile page URL into hKit by sneaking a <base> tag in while we normalize the HTML source.
* Profile pages without a "Link" header could trigger PHP notices due to a bad NULL -> array(NULL) conversion in LinkHeader::getLink(). Now checking that there was a return value before converting single return value into array.
2010-03-18 17:08:19 -07:00
Zach Copley
051bee988c Minor syntax err in TwitterBridge README example 2010-03-18 17:00:37 -07:00
Craig Andrews
26ba430ae8 Remove xpm support (no one really uses it, and IMAGETYPE_XPM is undefined, causing warnings)
Remove erroneous call to unlink in the constructor
2010-03-18 15:39:06 -07:00
Brion Vibber
b149b88953 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-03-18 15:39:04 -07:00
Zach Copley
109aac3c49 Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
* 'testing' of gitorious.org:statusnet/mainline:
  Fix for xmpp/sms notification options appearing to be disabled on new subscriptions.
2010-03-18 15:28:21 -07:00
Zach Copley
e10d023d03 API - handle any exceptions thrown during notice save. The API was
occasionally spitting out HTML, which is hard for clients to deal
with.
2010-03-18 15:26:13 -07:00
Brion Vibber
c8e3d08a8f Fix notice warning about unused var -- was renamed during refactoring. 2010-03-18 15:11:25 -07:00
Brion Vibber
69b25ba1be Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-03-18 14:33:45 -07:00
Brion Vibber
cac9d23498 Fix for xmpp/sms notification options appearing to be disabled on new subscriptions.
Base problem is that our caching-on-insert interferes with relying on column default values; the cached object is missing those fields, so they appear to be empty (null) when the object is retrieved from cache.
Now explicitly setting them when inserting subscriptions, and cleaned up some code that had alternate code paths.

May also have made auto-subscription work for remote OStatus subscribers, but can't test until magic sigs are working again.
2010-03-18 14:26:32 -07:00
Zach Copley
c09db79b95 Remove deprecated call-by-reference. Was causing a warning on Dreamhost. 2010-03-18 13:46:11 -07:00
Evan Prodromou
dbd44e51a2 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-03-18 15:21:43 -05:00
Evan Prodromou
2ccd5187cc change profile URL ensure method for OStatus 2010-03-18 15:21:26 -05:00
Brion Vibber
f1b3d84b7d Fix some remote subscription regressions from f21f78364a
Ostatus_profile::ensureProfile() has been renamed to Ostatus_profile::ensureProfileURL()
2010-03-18 13:13:57 -07:00
Brion Vibber
bbfb766885 Add readme notes about PHP <5.2.6 bug on 64-bit and PHP 5.3 issues. 2010-03-18 11:12:27 -07:00
Brion Vibber
0fe82bd0c9 Runtime check for known bad PHP versions with 64-bit stream_select() bug in xmppdaemon.php. 2010-03-18 11:08:27 -07:00
Brion Vibber
1de7badd78 Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing 2010-03-18 10:55:20 -07:00
Brion Vibber
515cdf28a8 Ensure that DB connection is active at start of User::updateKeys() and Foreign_user::updateKeys(); calls to $this->_quote() require a live connection object and don't lazy-initialize themselves.
May fix WSOD when changing incoming email address.
2010-03-18 09:24:55 -07:00
Evan Prodromou
425ddcaa26 add exception on inconsistent db to User::getProfile() 2010-03-18 08:35:10 -05:00
Evan Prodromou
0a1b10114b new exception class for when a user has no profile 2010-03-18 08:32:17 -05:00
Evan Prodromou
a764603e73 reverse order from delete, insert to insert, delete on ostatus conversion 2010-03-18 08:04:22 -05:00
Evan Prodromou
f1af583e3e catch exceptions in OStatus updates, log, and continue 2010-03-18 07:55:14 -05:00
Brion Vibber
ca5612c451 Merge branch 'master' into testing 2010-03-17 12:15:12 -07:00
Brion Vibber
dacd0f3e6d Fix to regression for auto-subscribe - was backwards. 2010-03-17 12:14:19 -07:00
Brion Vibber
22f827134c Workaround for HTTP authentication in the API when running PHP as CGI/FastCGI. Example rewrite lines added as comments in htaccess.sample, API tweaked to accept alternate environment var form. 2010-03-17 11:04:41 -07:00
Evan Prodromou
4761c07ad8 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-03-17 09:38:39 -05:00
Brion Vibber
f62b8a80cf Pull back for now on switch of PEAR error mode to exceptions; seems to trigger out exceptions at various times we don't want them.
For instance this was throwing an exception for DB_DataObject::staticGet when there's no match... definitely not what we want when all our code expects to get a nice null.
Example of this causing trouble: http://gitorious.org/statusnet/mainline/merge_requests/131

Revert "Don't attempt to retrieve the current user from the DB while processing a DB error"

This reverts commit 68347691b0.

Revert "Use PHP exceptions for PEAR error handling."

This reverts commit d8212977ce.
2010-03-16 16:32:25 -07:00
Evan Prodromou
f21f78364a Change the workflow to get better discovery
Tried to re-structure the workflow of discovery to get more and richer
data and hints.
2010-03-16 11:25:18 -05:00
Zach Copley
b994d529f4 Throw an exception if we receive a document instead of a feed's root element 2010-03-15 19:06:06 -07:00
Zach Copley
d1ea448c27 Always output a site logo via /api/statusnet/config.:format (so client devs have something to use) 2010-03-15 18:41:15 -07:00
Brion Vibber
441e52718e Background deletion of user accounts. Notices are deleted in chunks, then the user itself when they're all gone.
While deletion is in progress, the account is locked with the 'deleted' role, which disables all actions with rights control.

Todo:
* Pretty up the notice on the profile page about the pending delete. Show status?
* Possibly more thorough account disabling, such as disallowing all use for login and access.
* Improve error recovery; worst case is that an account gets left locked in 'deleted' state but the queue jobs have gotten dropped out. This would leave the username in use and any undeleted notices in place.
2010-03-15 16:08:00 -07:00
Brion Vibber
9ec24f59ca Drop result ID from data objects on clone(). This keeps the original object working if it was in the middle of a query loop, even if the cloned object falls out of scope and triggers its destructor.
This bug was hitting a number of places where we had the pattern:

$db->find();
while($dbo->fetch()) {
  $x = clone($dbo);
  // do anything with $x other than storing it in an array
}

The cloned object's destructor would trigger on the second run through the loop, freeing the database result set -- not really what we wanted.
(Loops that stored the clones into an array were fine, since the clones stay in scope in the array longer than the original does.)

Detaching the database result from the clone lets us work with its data without interfering with the rest of the query.
In the unlikely even that somebody is making clones in the middle of a query, then trying to continue the query with the clone instead of the original object, well they're gonna be broken now.
2010-03-15 15:58:55 -07:00
Zach Copley
40cde2f710 Initial Twitpic-like media upload endpoint /api/statusnet/media/upload 2010-03-15 22:16:33 +00:00
Brion Vibber
cb471e0c96 Blow more timeline caches on notice delete. Fixes paging on public and profile timelines after deleting something from the first page. 2010-03-15 14:19:22 -07:00
Brion Vibber
dfac4bfd09 Fix feed discovery: html:link@rel can contain multiple values; saw rel="updates alternate" in the wild at http://tantek.com/ which broke old discovery code. 2010-03-15 20:26:42 +00:00
Brion Vibber
c9232d8f26 Ticket #2242: fix reading of inline XHTML content in Atom feeds for OStatus input.
Lookup of the <div> needed to check for the XHTML namespace.
2010-03-15 20:21:55 +00:00
James Walker
7aa49b5e87 use canonical user url in xrd 2010-03-15 15:17:31 -04:00
Brion Vibber
e9b671e3af Consolidate and patch up redirection to remote notices.
Now using the correct order consistently (URL, then URI if http/s), and as a niceness measure skipping the redirect if the only URL we have stored is the local one. (Could happen if remote OStatus feed has tag URIs and no alt link.)
2010-03-15 11:38:37 -07:00
James Walker
c4f89b06f1 give preference to rel="photo" (per latest ActivityStreams spec), but still support rel="avatar" for compat 2010-03-14 12:57:24 -04:00
James Walker
85cf90cf0f Performing & allowing host-meta discovery by http url (in addition to webfinger acct) 2010-03-13 18:35:00 -05:00
James Walker
99ca84e68e changing keypair to text to hold a full 1024bit keypair 2010-03-13 15:46:54 -05:00
James Walker
9111c5c6fe allow profile_url to be used in ostatus:attention 2010-03-13 14:36:51 -05:00
James Walker
6ee536c258 Merge remote branch 'statusnet/testing' into crypt-rsa-switch 2010-03-13 10:51:32 -05:00
James Walker
a9dabbe77e * wrong param order to in_array
* in getContent() if "type" isn't set, assume text (per atom spec)
2010-03-13 10:37:08 -05:00
Evan Prodromou
c1e96cbdef Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-03-13 06:36:25 -06:00
James Walker
135c0c8a7f cleaning up key generation 2010-03-12 21:44:18 -05:00
James Walker
4e44cf906b converting key generation to new crypt library 2010-03-12 20:02:00 -05:00
James Walker
520faaf67d updating phpseclib to latest cvs - fixes a bunch of key generation issues 2010-03-12 20:01:34 -05:00
James Walker
c5bb41176e converted toString to new crypt library 2010-03-12 19:42:48 -05:00
James Walker
23d44c7d59 converted sign, verify and fromString to new crypt lib 2010-03-12 19:34:45 -05:00
James Walker
41d2ff662c Adding Crypt library from http://phpseclib.sourceforge.net/ 2010-03-12 19:34:24 -05:00