Commit Graph

198 Commits

Author SHA1 Message Date
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
1c6f9df80e PHP5.5 fix: Better use of startXML for Action classes (mostly AJAX)
I had a problem with PHP5.5 that caused ajax responses to be empty. This
fixes it, as the problem was related to pretty inconsistent calling to
headers, XMLWriter::startDocument etc. etc.
2013-09-24 01:18:33 +02:00
Mikael Nordfeldth
747fe9d59b Tidying up getUser calls to profiles and some events
getUser calls are much more strict, and one place where this was found was
in the (un)subscribe start/end event handlers, which resulted in making the
Subscription class a bit stricter, regarding ::start and ::cancel at least.
Several minor fixes in many files were made due to this.

This does NOT touch the Foreign_link function, which should also have a more
strict getUser call. That is a future project.
2013-09-09 23:03:34 +02:00
Mikael Nordfeldth
de55d8f83b plugins onAutoload now only overloads if necessary (extlibs etc.)
lib/plugin.php now has a parent onAutoload function that finds most common
files that are used in plugins (actions, dataobjects, forms, libs etc.) if
they are put in the standardised directories ('actions', 'classes', 'forms',
'lib' and perhaps some others in the future).
2013-08-28 16:10:30 +02:00
Mikael Nordfeldth
0bbcfa7bdf IMPORTANT - fixed HubSub to properly fetch primary keys
In commit e95f77d34c HubSub lost the
'staticGet' function in a consolidation into the Managed_DataObject class.
This was done carelessly by me as HubSub::staticGet was actually taking
two arguments, none of which was a key and merging them in HubSub::hashkey()
(staticGet was renamed getKV 2a4dc77a63).

NOTE: This complements commit 7e4718a4eb which
fixed a similar issue for the Magicsig class.
2013-08-21 11:25:08 +02:00
Mikael Nordfeldth
e40044e2fa Further static declarations of functions
Validate could probably be replaced with filter_var if desired (PHP>=5.2.0)
2013-08-19 14:26:44 +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
Mikael Nordfeldth
f79aec36fe Merge remote-tracking branch 'statusnet/master'
This merges GNU Social with current development of StatusNet. The only conflicts were some documentation, where GNU Social's versions were retained.

Conflicts:
	doc-src/about
	doc-src/faq
	plugins/OpenID/doc-src/openid
2013-08-12 12:23:17 +02:00
Evan Prodromou
330041e8bf Merge branch 'master' of gitorious.org:statusnet/mainline 2012-07-28 13:59:40 -04:00
Mikael Nordfeldth
19c3cd541d Issue 3401, ostatus group subscription lands on blank page 2012-07-28 13:58:26 -04:00
Evan Prodromou
d5564fb8d8 Add a trace, too 2012-07-04 15:14:35 -04:00
Evan Prodromou
7e60bb04e5 Add an exception on remote group join 2012-07-04 15:12:08 -04:00
Siebrand Mazeland
1fa689e913 tag -> list 2011-08-20 20:30:37 +02:00
Siebrand Mazeland
9f9f940833 Add translator documentation.
Change a few double quotes to single quotes.
2011-06-05 11:30:46 +02:00
Ian Denhardt
31b29fde50 Merge branch '1.0.x' of git://gitorious.org/statusnet/mainline
Conflicts:
	plugins/OStatus/actions/ostatusinit.php
2011-05-23 21:50:48 -04:00
Siebrand Mazeland
1d1a929718 Update translator documentation and L10n. 2011-05-20 16:03:53 +02:00
Siebrand Mazeland
4651c9d94a Fix L10n/i18n.
Some remaining people tag -> list.
Favor -> like
Update translator documentation.
Whitespace updates.
2011-04-29 18:59:47 +02:00
Siebrand Mazeland
4ab995dd1e Complete "people tag" to "list" in UI messages.
Update translator documentation accordingly.

Probably a few cases left where "tag[ged[" has to be replaced by "list[ed]".
2011-04-17 20:08:03 +02:00
Siebrand Mazeland
c27b9c0722 Update translator documentation.
i18n/L10n updates.
Whitespace updates.
2011-04-15 15:07:35 +02:00
Shashi Gowda
53af608ef8 People tags -> Lists (only UI changes, for experimentation) 2011-04-14 19:49:42 +00:00
Siebrand Mazeland
b83e0fd0e8 Update translator documentation.
i18n fixes (gettext domain).
L10n updates.
Whitespace updates.
Some tabs to spaces.
2011-04-11 00:39:51 +02:00
Shashi Gowda
57198a7464 Merge remote-tracking branch 'mainline/1.0.x' into people_tags_rebase
Conflicts:
	actions/tagother.php
	lib/subscriberspeopleselftagcloudsection.php
	lib/subscriptionspeopleselftagcloudsection.php
2011-04-04 13:26:27 +05:30
Siebrand Mazeland
14456cbbb2 Fix gettext domain for messages in plugins "_()" to "_m()".
Some other i18n and L10n updates, too.

i18n/L10n review not complete.
2011-03-30 22:31:23 +02:00
Ian Denhardt
d36f0707a4 Merge branch '1.0.x' of git://gitorious.org/statusnet/mainline 2011-03-28 03:25:40 -04:00
Shashi Gowda
bf121a695a Merge remote-tracking branch 'mainline/1.0.x' into people_tags_rebase
Conflicts:
	classes/Profile.php
2011-03-22 07:59:06 +05:30
Brion Vibber
541dfa04fe Switch things from calling Group_member::join & leave & calling events manually to running through Profile::joinGroup() && Profile::leaveGroup(), with the events encapsulated. 2011-03-21 14:35:29 -07:00
Ian Denhardt
27ef3b1d90 Merge branch '1.0.x' of git://gitorious.org/statusnet/mainline
Conflicts:
	actions/public.php
2011-03-15 12:42:58 -04:00
Shashi Gowda
c335db4bbc OStatus support for people tags 2011-03-07 00:45:34 +05:30
Zach Copley
b7d0746694 Merge branch '0.9.x' into 1.0.x
Conflicts:
	actions/confirmaddress.php
	actions/emailsettings.php
	actions/hostmeta.php
	actions/imsettings.php
	actions/login.php
	actions/profilesettings.php
	actions/showgroup.php
	actions/smssettings.php
	actions/urlsettings.php
	actions/userauthorization.php
	actions/userdesignsettings.php
	classes/Memcached_DataObject.php
	index.php
	lib/accountsettingsaction.php
	lib/action.php
	lib/common.php
	lib/connectsettingsaction.php
	lib/designsettings.php
	lib/personalgroupnav.php
	lib/profileaction.php
	lib/userprofile.php
	plugins/ClientSideShorten/ClientSideShortenPlugin.php
	plugins/Facebook/FBConnectSettings.php
	plugins/Facebook/FacebookPlugin.php
	plugins/NewMenu/NewMenuPlugin.php
	plugins/NewMenu/newmenu.css
2011-02-28 15:39:43 -08:00
Brion Vibber
ee9e368aa8 Fix ticket #3016: when using non-AJAX form of the ostatus subscription initiation for non-local group joins, show the "group" field instead of a blank "user" field 2011-01-26 14:57:52 -08:00
Evan Prodromou
5c25364141 remove extraneous <dl> and <dt> tags 2011-01-14 15:36:06 -05:00
Evan Prodromou
b54ea6767a New event for Salmon including target 2010-12-27 10:51:59 -08:00
Ian Denhardt
e36399974e Merge branch '1.0.x' of git://gitorious.org/statusnet/mainline
Conflicts:
	lib/action.php
	plugins/OStatus/actions/ostatusinit.php
2010-12-20 15:19:33 -05:00
Matt Lee
adb98ce5d1 updated 2010-11-29 16:02:17 -05:00
Matt Lee
675d902cab updated 2010-11-29 16:01:19 -05:00
Matt Lee
3277523448 updated 2010-11-29 16:00:54 -05:00
Matt Lee
4da41d95ee updated 2010-11-29 16:00:17 -05:00
Matt Lee
f4dd6c2916 updated 2010-11-29 15:58:41 -05:00
Matt Lee
67db18d30b updated 2010-11-29 15:57:28 -05:00
Matt Lee
432237178f updated 2010-11-29 15:55:58 -05:00
Evan Prodromou
0a4911552e Move user xrd action to core and use hooks to extend
Moved the Webfinger user XRD action from the OStatus plugin to core.
Added hooks to add OStatus-specific stuff, but kept general stuff in
the core.
2010-11-26 21:38:38 -05:00
Craig Andrews
3f3b38766f move xrd and hostmeta out of the OStatus plugin and into core
add event for setting up hostmeta, and use them in the OStatus plugin
2010-11-26 21:12:14 -05:00
Evan Prodromou
ecb582e419 accept profile URL as a LRDD identifier 2010-10-14 11:07:37 -04: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
2295bbec9e Extra debug helper line in push callback 2010-10-04 14:22:32 -07:00
Brion Vibber
80e0e60c37 Add a comment in UserxrdAction warning future maintainers not to break domain migrations if adding domain checking to the webfinger lookup in future. 2010-09-27 11:38:26 -07:00
Siebrand Mazeland
5a6f616206 * i18n/L10n update
* translator comments added
* remove superfluous whitespace
2010-09-19 15:17:36 +02:00
Siebrand Mazeland
1bfbe9badf * i18n/L10n updates and FIXMEs added
* whitespace fixes
2010-09-03 01:35:04 +02:00
Evan Prodromou
ebcd8644a5 Revert "debugging replyToID"
This reverts commit bb9353f6e0.
2010-09-01 18:22:54 -04:00
Evan Prodromou
bb9353f6e0 debugging replyToID 2010-09-01 17:59:49 -04:00
Evan Prodromou
27626c3abf Correctly check for user's id in replies in user salmon post 2010-09-01 17:10:29 -04:00
Evan Prodromou
c82b1cda82 send a salmon slap to mentioned person when we reply to a notice 2010-09-01 14:35:43 -04:00
Evan Prodromou
029aa0c61c fix use of activity rather than act in salmonaction subclasses, too 2010-08-13 14:18:54 -07:00
James Walker
56294016a7 fix #2478 - ensure all XRD documents get proper content-type headers 2010-08-02 14:47:13 -04:00
Brion Vibber
21f253c584 Fix regression in OStatus remote group subscribe -- a bug was previously masked silently (call to nonexistent getProfileUrl() method on User_group -- now replaced with homeUrl() which does the thing we wanted here) 2010-06-29 10:31:30 -04:00
Brion Vibber
acea534044 Disable the send-notice form at the top of the page OStatus subscription confirmation page to work around bugs in Cloudy theme.
This is really just a hack for the broken CSS in the Cloudy theme, I think; copying from other non-notice-navigation pages that do this as well. There will be plenty of others also broken.
2010-04-19 19:45:01 +02:00
Zach Copley
7b1b6045e6 Look for the first object in the Activity 2010-03-24 00:00:55 -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
3bb639699c Confirm there's actually user and domain portions of acct string before assigning things from output of explode(); avoids notice message when invalid input passed to main/xrd 2010-03-22 11:27:39 -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
Evan Prodromou
4761c07ad8 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-03-17 09:38:39 -05: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
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
9111c5c6fe allow profile_url to be used in ostatus:attention 2010-03-13 14:36:51 -05:00
Brion Vibber
8f1762cb95 OStatus: fix for remote group join via non-logged-in 'join' button.
Bad lookup was sending us to the first group instead of the selected group.
2010-03-04 09:24:47 -08:00
James Walker
9cbeac5695 Merge remote branch 'statusnet/testing' into testing 2010-03-04 01:31:19 -05:00
James Walker
849f5783c4 update xrd -> userxrd 2010-03-04 01:30:15 -05:00
Sarven Capadisli
b97ac60209 Changed text for authorizing/confirming remote profile 2010-03-03 23:47:27 -05:00
James Walker
1c8399fde1 refactor xrd to allow for ownerxrd - xrd document for the site owner.
introduced $config['webfinger']['owner'] for a custom xrd subject
2010-03-03 23:20:30 -05:00
Sarven Capadisli
de687d00c0 Updated OStatus subscription error messages to be more user friendly.
Hopefully.
2010-03-03 22:56:50 -05:00
Brion Vibber
a4d9171306 Fix up catching of webfinger setup fails 2010-03-03 18:23:28 -08:00
Sarven Capadisli
6a5a629afa Updated label and note text for user and group remote subscribe forms 2010-03-03 20:08:55 -05:00
Brion Vibber
628338265c OStatus: fix up remote join button on group profiles 2010-03-03 14:06:05 -08:00
Brion Vibber
a42d1116db Separate the UI paths for ostatussub and ostatusgroup. They'll redirect to each other transparently if they find you've put a remote entity of the other type. 2010-03-03 13:40:26 -08:00
Sarven Capadisli
623faf9f2d Just a label change. Since the user already went ahead with
subscribing, in this step we are just confirming the profile.
2010-03-02 09:57:28 -05:00
Brion Vibber
680ace1966 High-priority OStatus fixes:
* PuSHing out to multiple client services could fail; only first callback got reached
* Correction for re-sub request to a known sub
2010-03-01 18:46:34 -08:00
Brion Vibber
00f724d0e6 Localization tweak: include doc comments marked as 'TRANS' in .po file output; these should now get automatically pulled through to the TranslateWiki interface as translator help hints. 2010-03-01 14:10:13 -08:00
James Walker
3a7eef1074 only put public keys in XRD 2010-02-26 14:22:49 -05:00
James Walker
bbb0a7d5bc updating to use latest salmon NS definitions 2010-02-26 14:22:49 -05:00
James Walker
d1256b547f bad merge.. cleaning up missing webfinger bits 2010-02-26 03:43:35 -05:00
James Walker
84d0c865c4 salmon actually fetching remote keypairs 2010-02-26 03:25:51 -05:00
James Walker
7c8031dc4b Merge remote branch 'statusnet/testing' into testing
Conflicts:
	plugins/OStatus/lib/webfinger.php
2010-02-25 23:49:45 -05:00
Evan Prodromou
cc0670791e use new hcard method for webfinger 2010-02-25 19:58:18 -05:00
Evan Prodromou
4aa82f75ed Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-02-25 18:45:32 -05:00
Evan Prodromou
6578e0e1af use new dedicated hcard method for Webfinger profile 2010-02-25 18:45:08 -05:00
James Walker
93f4f07c12 moving webfinger action to xrdaction 2010-02-25 17:52:18 -05:00
James Walker
5ae64a7adb moving references to Webfinger to Discovery 2010-02-25 17:34:56 -05:00
James Walker
bd90ef9f66 replace webfinger usage in hostmeta.php 2010-02-25 17:26:10 -05:00
Brion Vibber
b5b5184c88 OStatus: fix remote groups to work with new user_groups/local_groups split.
- fix <activity:subject> generation so we get the profile info (what's available so far)
- use id instead of nickname for group join/leave forms so we can join/leave remote groups
  while the rest of the groups UI remains limited to local groups
  (plugins are responsible for making sure remote notifications and permission checks are done)
- fix remote notification when joining group through OStatus's remote subscribe form
2010-02-25 13:02:08 -08:00
Brion Vibber
c36bdc1ba5 - break OMB profile update pings to a background queue
- add event hooks to profile update pings
- send Salmon pings with custom update-profile event to OStatus subscribees and groups (subscribers will see it on your next post)
- fix OStatus queues with overlong transport names, should work on DB queues now
- Ostatus_profile::notifyActivity() and ::notifyDeferred() now can take XML, Notice, or Activity for convenience
2010-02-24 20:36:36 +00:00
Brion Vibber
2e58802cc9 OStatus: fix group delivery, send reply/group Salmon pings from background. 2010-02-24 02:20:31 +00:00
James Walker
391b45949f adding xfn, foaf and hcard rel's to our webfinger output 2010-02-23 18:25:31 -05:00
Brion Vibber
5f9a8ca64b OStatus: accept webfinger addresses as well as profile URLs in the explicit remote subscribe form. 2010-02-23 21:11:44 +00:00
Brion Vibber
90d34b26c6 OStatus: do PuSH subscription setup from subscribe/join event hooks, so resubscribing directly from a profile/group list works correctly if there aren't active subscriptions at the moment. 2010-02-23 20:44:27 +00:00
Brion Vibber
c79c70ea2c OStatus subscription UI tweak: if we're already subscribed/joined, say so and don't offer a 'subscribe'/'join' button on the profile preview page. 2010-02-23 11:56:17 -08:00
Brion Vibber
e070fcaaae OStatus: fix for avatars, submit button in updated remote profile preview 2010-02-23 11:37:49 -08:00
James Walker
f4b34d67c5 generate keypairs for users, and put them in the XRD for discovery 2010-02-22 23:30:31 -05:00
Sarven Capadisli
b67bb182b0 Refactored preview info and form for authorizing a remote subscription 2010-02-23 04:59:34 +01:00
Brion Vibber
193448d1be OStatus: cleanup on ostatussub preparing for final UI work on the remote sub/join forms. 2010-02-23 01:58:05 +00:00
Brion Vibber
06f155c02d OStatus: initial hookup of remote group membership (notice delivery not yet working quite right)
- added a temp config var to disable salmon magic signatures until they're working consistently
2010-02-22 12:13:57 -08:00