Commit Graph

59 Commits

Author SHA1 Message Date
Brion Vibber
2a29738dc1 Revert "Session GC fix: save session.modified field as UTC so our comparisons work." - no longer needed with ticket #3020 fix to time zone settings
This reverts commit a7abb2323e.
2011-01-31 11:50:24 -08:00
Brion Vibber
a7abb2323e Session GC fix: save session.modified field as UTC so our comparisons work.
Had to tweak statusnet.ini to remove the DB_DATAOBJECT_MYSQLTIMESTAMP bitfield constant on session.modified; while it sounds like a useful and legit setting, it actually just means that DB_DataObject silently fails to pass through any attempts to explicitly set the value. As a result, MySQL does its default behavior which is to insert the current *LOCAL* time, which is useless.
This was leading to early GC west of GMT, or late GC east of it. Early GC could at worst destroy all live sessions (whoever's session *triggered* GC is fine, as the session then gets saved right back.)
2011-01-27 12:27:31 -08:00
Zach Copley
e56385a7bb Use a new table (oauth_token_association) to associate authorized
request tokins with OAuth client applications and profiles.
2010-10-20 17:21:04 -07:00
Zach Copley
3d6a0f730d Revert DB change for OAuth. Change compound key for oauth_application_user
back to (profile_id, application_id). I think we can get away without
a DB change by only issuing one anonymous access token per user.
2010-10-20 11:41:04 -07:00
Zach Copley
e8b6d7c946 Add support for an anonymous OAuth consumer. Note: this requires a
small DB tweak.  Oauth_application_user needs to have the primary
compound key: (profile_id, application_id, token).

http://status.net/open-source/issues/2761

This should also make it possible to have multiple access tokens
per application.

http://status.net/open-source/issues/2788
2010-10-19 20:54:53 -07:00
Brion Vibber
3aee8e0448 Fix a few keys that got dropped from statusnet.ini by mistake 2010-02-25 21:46:53 -08:00
Evan Prodromou
8f42d37593 Add 'mainpage' to User_group
Add the mainpage attribute to user_group objects.
2010-02-25 09:24:29 -05:00
Evan Prodromou
ddc3671b6a recover user_openid tables, which got lost in generation 2010-02-24 23:32:20 -05:00
Evan Prodromou
68a10970f9 fixup exe bits 2010-02-24 23:30:14 -05:00
Evan Prodromou
bd68154772 Make user_group able to handle remote groups
We add a local_group table to store data about local groups. It has
the unique key for nickname, so /group/<nickname> looks up here.

Updated DB data object classes and data files.
2010-02-24 23:28:41 -05:00
Zach Copley
ed46a38ecf - conversation.uri needs to be nullable
- factory method for creating new local conversations
2010-02-17 01:11:14 -08:00
Zach Copley
a2f8c5da17 New Conversation DO to handle remote notices as conversation roots 2010-02-16 23:30:08 -08:00
Zach Copley
8d320d7cc2 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-02-05 02:08:37 +00:00
Zach Copley
82f1119073 OAuth app name should not be null 2010-02-05 01:24:21 +00:00
Brion Vibber
a020e23086 Merge branch 'master' of gitorious.org:statusnet/mainline into testing 2010-02-04 11:56:07 -08:00
Evan Prodromou
6215b9788c add nickname as unique key for user_group table 2010-02-03 11:53:31 -05:00
Zach Copley
df2a081265 OAuth app names should be unique. 2010-02-02 08:50:01 +00:00
Zach Copley
6efbf2777a Add verifier and verified callback to token for OAuth 1.0a 2010-01-24 16:36:05 -08:00
Zach Copley
d33040089d Remove verifier from Oauth_application_user (not needed there) 2010-01-24 16:36:05 -08:00
Zach Copley
c2337ab47c Decided we didn't need to keep the token secret in the
Oauth_application_user record
2010-01-24 16:36:02 -08:00
Zach Copley
c473a39a7d Associate request tokens with OAuth apps and app users 2010-01-24 16:36:02 -08:00
Zach Copley
035c475b45 It might help if I checkd in statusnet.ini. 2010-01-24 16:36:02 -08:00
Brion Vibber
0e852def6a XMPP queued output & initial retooling of DB queue manager to support non-Notice objects.
Queue handlers for XMPP individual & firehose output now send their XML stanzas
to another output queue instead of connecting directly to the chat server. This
lets us have as many general processing threads as we need, while all actual
XMPP input and output go through a single daemon with a single connection open.

This avoids problems with multiple connected resources:
* multiple windows shown in some chat clients (psi, gajim, kopete)
* extra load on server
* incoming message delivery forwarding issues

Database changes:
* queue_item drops 'notice_id' in favor of a 'frame' blob.
  This is based on Craig Andrews' work branch to generalize queues to take any
  object, but conservatively leaving out the serialization for now.
  Table updater (preserves any existing queued items) in db/rc3to09.sql

Code changes to watch out for:
* Queue handlers should now define a handle() method instead of handle_notice()
* QueueDaemon and XmppDaemon now share common i/o (IoMaster) and respawning
  thread management (RespawningDaemon) infrastructure.
* The polling XmppConfirmManager has been dropped, as the message is queued
  directly when saving IM settings.
* Enable $config['queue']['debug_memory'] to output current memory usage at
  each run through the event loop to watch for memory leaks

To do:
* Adapt XMPP i/o to component connection mode for multi-site support.
* XMPP input can also be broken out to a queue, which would allow the actual
  notice save etc to be handled by general queue threads.
* Make sure there are no problems with simply pushing serialized Notice objects
  to queues.
* Find a way to improve interactive performance of the database-backed queue
  handler; polling is pretty painful to XMPP.
* Possibly redo the way QueueHandlers are injected into a QueueManager. The
  grouping used to split out the XMPP output queue is a bit awkward.
2010-01-21 22:40:35 -08:00
Evan Prodromou
8b2f6c01fb add inbox data class 2010-01-09 10:01:21 -08:00
Brion Vibber
aff78e5121 Cache fixes:
* We now cache negative lookups; clear them in Memcached_DataObject->insert()
* Mark file.url as a unique key in statusnet.ini so its negative lookups are cleared properly (first save of a notice with a new URL was failing due to double-insert)
* Now using serialization for default in-process cache instead of just saving objects; avoids potential corruption if you save an object to cache, change the original object, then fetch the same key from cache again
2010-01-05 15:05:53 -08:00
Evan Prodromou
8f362e9956 user_id is a non-autoincrement pkey for user_location_prefs 2010-01-04 08:53:28 -10:00
Brion Vibber
e152bec282 Fix for saving user location preferences -- user_id field was marked as an auto-increment and wasn't getting saved with new inserts. 2009-12-29 11:46:10 -08:00
Evan Prodromou
29a1669c01 user_id is primary key for user_location_prefs 2009-12-28 14:43:14 -08:00
Evan Prodromou
c326824135 add user-location-prefs data objects 2009-12-28 13:59:03 -08:00
Evan Prodromou
2a1468ec8b Merge branch '0.9.x' into testing 2009-12-15 16:24:52 -05:00
Evan Prodromou
c9649f9321 reset executable bit on Notice.php and statusnet.ini 2009-12-11 10:23:36 -05:00
Evan Prodromou
da30890988 add repeat_of column to notice class 2009-12-11 10:22:56 -05:00
Evan Prodromou
e9b733e7f0 Merge branch '0.9.x' into testing 2009-12-11 09:55:47 -05:00
Evan Prodromou
dd098fee77 remove forward table from db scripts 2009-12-10 14:34:47 -05:00
Evan Prodromou
6bc6af667e fix exe flag 2009-12-08 15:43:34 -05:00
Evan Prodromou
0f1d0ab4d7 add DB_DataObject for forward table 2009-12-08 15:43:11 -05:00
Evan Prodromou
78fc9483d4 Merge branch '0.9.x' into testing 2009-12-08 14:43:21 -05:00
Craig Andrews
75cac0fd6b Added 'login' command that gives you a link that can be used to login to the website 2009-12-05 21:05:33 -05:00
Zach Copley
9dc888894b Merge branch 'master' into 0.9.x
* master: (67 commits)
  Ticket 2038: fix bad bug tracker link
  Fix regression in group posting: bug introduced in commit 1319002e15. Need to use actual profile object rather than an id on a variable that doesn't exist when checking blocks :D
  Log database errors when saving notice_inbox entries
  Drop the username from the log id for now; seems to trigger an error loop in some circumstances
  request id on logs... pid + random id per web request + username + method + url
  Add OpenID ini info back into statusnet.ini as a stopgap until we can
  Some changes to the OpenID DataObjects to make them emit the exact same
  OpenID plugin should set 'user_openid.display' as unique key
  Remove relationship: user_openid.user_id -> user.id. I don't think this
  Have OpenID plugin DataObjects emit their own .ini info
  Revert "Allow plugin DB_DataObject classes to not have to use the .ini file by overriding keys(), table(), and sequenceKey() for them"
  Catch and report exceptions from notice_to_omb_notice() instead of letting the OMB queue handler die.
  Fix regression in remote subscription; added hasRole() shadow method on Remote_profile.
  Fix fatal error on OMB subscription for first-timers
  Remove annoying log msg
  Drop error message on setlocale() failure; this is harmless, since we actually have a working locale set up.
  Catch uncaught exception
  Fixed bug where reply-sync bit wasn't getting saved
  Forgot to render the nav menu when on FB Connect login tab
  Facebook plugin no longer takes over Login and Connect settings nav menus
  ...

Conflicts:
	db/08to09_pg.sql
	db/statusnet_pg.sql
	locale/pt_BR/LC_MESSAGES/statusnet.mo
	plugins/Mapstraction/MapstractionPlugin.php
2009-11-30 10:28:58 -08:00
Zach Copley
261ee0264a Add OpenID ini info back into statusnet.ini as a stopgap until we can
get plugins to load ini info properly on status.net
2009-11-26 18:49:18 +00:00
Zach Copley
8acc1587b1 Revert "Allow plugin DB_DataObject classes to not have to use the .ini file by overriding keys(), table(), and sequenceKey() for them"
This reverts commit a373d07ae0.

Conflicts:

	classes/statusnet.ini
	lib/schema.php
	plugins/Authentication/AuthenticationPlugin.php
	plugins/OpenID/OpenIDPlugin.php
	plugins/UserFlag/UserFlagPlugin.php
2009-11-25 13:38:59 -08:00
Craig Andrews
e9b877a4a3 correct the primary key for login_token 2009-11-20 10:56:06 -05:00
Evan Prodromou
6a1afda259 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
	classes/statusnet.ini
2009-11-17 06:25:07 -05:00
Craig Andrews
a373d07ae0 Allow plugin DB_DataObject classes to not have to use the .ini file by overriding keys(), table(), and sequenceKey() for them 2009-11-16 15:24:25 -05:00
Evan Prodromou
dd10e9729b fix exe flag after createTable 2009-11-16 16:05:22 +01:00
Evan Prodromou
4e00ce01a9 Rename user_role to profile_role
Renamed the user_role table to profile_role. Remote users can have a
role on the site; that 'role' may be negative (silenced or sandboxed).
2009-11-16 16:02:47 +01:00
Craig Andrews
ed690615de Added a User_username table that links the external username with a StatusNet user_id
Added EmailAuthenticationPlugin
Added ReverseUsernameAuthenticationPlugin
Changed the StartChangePassword and EndChangePassword events to take a user, instead of a nickname
User::allowed_nickname was declared non-static, but used as if it was static, so I made the declaration static
2009-11-12 20:12:36 -05:00
Craig Andrews
b9d40f723b Added 'login' command that gives you a link that can be used to login to the website 2009-11-02 18:40:49 -05:00
Craig Andrews
acaf07f6e8 Added an "Verify Your Identity" page to the OpenID provider 2009-10-30 13:21:37 -04:00
Evan Prodromou
b7a4437e79 flip x flag on generated files 2009-10-21 22:43:41 -04:00