Commit Graph

105 Commits

Author SHA1 Message Date
Evan Prodromou 98a0d7f538 Configuration options for using an HTTP proxy
We can make a lot of HTTP requests from the server side. This change
adds some configuration options for using an HTTP proxy, which can
cache hits from multiple sites (good for status.net-like services, for example).
2011-01-03 10:38:32 -08:00
Evan Prodromou 5fe8301129 disable account deletion by default 2010-12-22 11:25:47 -08:00
Evan Prodromou 7c7b91e61a define configuration settings for account maintenance security 2010-12-13 16:28:02 -05:00
Evan Prodromou bb63fd4b75 Config flag to disable router caching if needed 2010-12-06 17:19:41 -05:00
Evan Prodromou b3d47ed6cc Make code-dependent cache entries more volatile
If a cache entry is dependent on the code that's running, upgrading
(or enabling/disabling plugins) can generate hard-to-track
inconsistencies.

This change adds a close-to-unique fingerprint of the running code to
some cache keys, so that if the fingerprint changes, the old values
are ignored and new values are used.

If the automated uniqueness fails, an administrator can add an extra
config value, $config['site']['build'], that's thrown into the key also.
2010-12-06 17:05:32 -05:00
Brion Vibber 197b56778a Add $config['attachments']['process_links'] to allow disabling processing of mentioned URL links for attachment info (oEmbed lookups) and dereferencing of redirects that we didn't have shortened ourselves.
This option may be useful for intranet sites that don't have direct access to the internet, as they may be unable to successfully fetch those resources.
2010-11-17 13:03:59 -08:00
Brion Vibber cb124fe831 Add a quick config setting to disable/enable display of thumbnails in regular notice lists (attachments/show_thumbs) - disabling gives the same display as before this feature was added (but changes to oembed handling are still there, and the lightbox popup is gone) 2010-11-12 12:24:55 -08:00
Brion Vibber 694448e0aa Add attachments 'thumb_width' and 'thumb_height' settings for inline thumbs, defaulting to 100x75.
This is used as the max thumb width/height for oEmbed requests (replacing the old default of 500x400 which was more suitable for the lightbox).
2010-11-08 17:36:02 -08:00
Evan Prodromou 47ac8458ca default for nofollow external is sometimes 2010-10-18 11:41:18 -04:00
Evan Prodromou 7c05b0dafc options to nofollow external links in notices 2010-10-18 11:29:52 -04:00
Evan Prodromou 1a4dc03bfe document and default for site|ssllogo 2010-10-14 14:56:38 -04:00
Evan Prodromou b31c49c5d4 Make HTTPS urls in File::url() if necessary 2010-10-14 14:22:17 -04:00
Brion Vibber 54c88cba57 Add a $config['plugins']['locale_path'] which can be set to override the individual plugins' locale subdirectories.
This will apply to *ALL* plugins in *ALL* languages, so should probably only be used when doing site customization...

You'd probably do:

  $config['site']['locale_path'] = '/srv/awesome/data/locale';
  $config['plugins']['locale_path'] = '/srv/awesome/data/locale';

with a structure like:
srv/
  awesome/
    data/
      locale/
        en/
          LC_MESSAGES/
            statusnet.po
            OpenID.po
            AnonymousFave.po

etc, all alongside each other. You could separate plugins from the core if you like.

Where locale files have not already been generated, you can build one for a plugin like so:

  php scripts/update_po_templates.php --plugin=MyPlugin

and pull out the template file:

  plugins/MyPlugin/locale/MyPlugin.pot

Edit that (make sure you at least set the CHARSET, probably to UTF-8) and save your customized .po
files into the structure as above, and use msgfmt to generate .mo files for final output.
2010-09-30 19:18:46 -07:00
Zach Copley 55ad954b15 Basic license admin panel (maybe we can make it fancier later) 2010-09-17 16:38:12 -07:00
Brion Vibber ebd2fc2f7c Partial fix for ticket #2489 -- problems with SNI SSL virtual host certificate validation.
Two prongs here:
* We attempt to enable SNI on the SSL stream context with the appropriate hostname... This requires PHP 5.3.2 and OpenSSL that supports the TLS extensions. Unfortunately this doesn't seem to be working in my testing.
* If set $config['http']['curl'] = true, we'll use the CURL backend if available. In my testing on Ubuntu 10.04, this works. No guarantees on other systems.

I'm not enabling CURL mode by default just yet; want to make sure there's no other surprises.
2010-08-06 10:14:07 -07:00
Brion Vibber 09208f8d65 Basic custom CSS and theme uploading features. 'local' subdir can now be customized to a distinct directory and URL path to make it easier to separate custom themes for a multi-site farm running a common code base.
Currently only one custom theme may be uploaded per site, saved with the name 'custom' and stored into the local/themes subdirectory.
Administrators can upload a .ZIP archive containing a theme through the design admin panel; its contents are validated to ensure that only legit files are saved, and a 5M size quota is enforced.
Theme upload requires the zip extension for PHP; if not present, theme uploading is disabled by default.

Uploading and the custom CSS can be controlled via $config['theme_upload']['enabled'] and $config['custom_css']['enabled'].

Configurable directory/path/server for 'local' subdirectory (currently only as used for themes; local plugins not yet switched over)

Can set $config['local']['dir'] etc; not currently exposed in the admin panels.

Per-site directories on a separate themes server could be set up such as:
  $config['local']['dir'] = '/path/to/themes/local/' . $_nickname;
  $config['local']['server'] = 'themes.example.com';
  $config['local']['path'] = '/local/' . $_nickname;
  $config['local']['ssl'] = 'never';
2010-06-07 18:14:16 -07:00
Brion Vibber 2c12d837c6 Disable SSL peer/hostname verification for HTTPClient unless we've configured a trusted CA bundle like this: $config['http']['ssl_cafile'] = '/usr/lib/ssl/certs/ca-certificates.crt';
The previous state was failing on all HTTPS hits due to HTTP_Request2 library turning on the validation check but not specifying a CA file.
2010-05-21 10:12:39 -07:00
Brion Vibber bb94b78e89 Handle timeout more gracefully in background pings
Added a 2-second default timeout for XMLRPC/extended pings, configurable as [ping,timeout].
No longer repeating the entire ping section if we had an HTTP error during a submission.
For now, dropping the bad item and continuing on with others. (Todo: individual retry and cleaner discards of blacklisted broken-for-now sites.)
2010-05-04 18:43:32 -07:00
Brion Vibber b71f276ed5 Merge branch 'master' into testing 2010-04-05 10:42:41 -07:00
Evan Prodromou a313aeab9c lib/default.php has nofollow group 2010-04-05 10:24:22 -04:00
Brion Vibber faa14b64ab Tweak to Eugene Crosser's patch to make transactions and acks configurable; disabling them gets basic message delivery working under MorbidQ, and may help with RabbitMQ etc.
I swapped the settings from negative to positive ($config['queue']['stomp_transactions'] = false rather than $config['queue']['stomp_no_transactions'] = true), gave them defaults (both on for best ActiveMQ experience), and added notes to the README about configuring them.
2010-03-29 15:46:41 -07:00
Brion Vibber d44e5ac935 Add $config['db']['annotate_queries'] option to include caller ID comments into queries. Comment can then be seen in process list, slow query logs on the server, aiding in tracking down unexpected slow queries.
SELECT /* queuedaemon.php Ostatus_profile->processPost */ * FROM notice WHERE ( notice.uri = 'http://stormcloud.local/mublog2/notice/479' )
INSERT /* POST Notice::saveNew */ INTO notice (profile_id , content ....
2010-03-29 13:14:11 -07:00
Brion Vibber 6c4ade4251 Merge branch 'testing' into 0.9.x 2010-03-09 11:27:53 -08:00
Evan Prodromou 5f7aa6f2e3 make API realm configurable 2010-03-08 12:36:03 -05:00
Brion Vibber f969d6349c Merge branch 'testing' into 0.9.x
Conflicts:
	db/08to09.sql
2010-03-04 10:16:59 -08:00
Evan Prodromou fd4eefe6b4 OStatus enabled by default 2010-03-04 11:43:31 -05:00
Brion Vibber b218aee94e Merge commit 'origin/testing' into 0.9.x
Conflicts:
	lib/action.php
	lib/adminpanelaction.php
2010-03-04 06:07:28 -08:00
Zach Copley 337b1aaaa1 Site-wide notice text admin panel 2010-03-03 14:37:30 -08:00
Brion Vibber 0881eba80e Language setting fixes:
- switch 'en_US' to 'en', fixes the "admin panel switches to Arabic" bug
- tweak setting descriptions to clarify that most of the time we'll be using browser language
- add a backend switch to disable language detection (should this be exposed to ui?)
2010-03-03 12:10:43 -08:00
Brion Vibber ddf3614c84 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x 2010-03-02 13:38:10 -08:00
Zach Copley 871b3aa6c0 Remove un-needed config variable for enabling/disabling Twitter integration 2010-03-01 21:52:31 -08:00
Zach Copley 6b2d67216e Initial Twitter bridge admin panel 2010-03-01 21:35:24 -08:00
Brion Vibber 8dfc8f1635 Merge branch 'testing' into 0.9.x 2010-02-26 09:35:28 -08:00
Evan Prodromou f9e5acbfa7 remove linkback from default plugins 2010-02-25 21:53:18 -05:00
Brion Vibber 2d9d444b05 Pulling PubSubHubbub plugin out of default list for 0.9.x; not compatible with recent changes to Atom feed generation for OStatus. 2010-02-21 11:13:57 -08:00
Brion Vibber 85528ccb1f Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x 2010-02-21 11:12:56 -08:00
Evan Prodromou 61a072b3c4 Add a library to mint tag URIs
We've been making pretty crummy tag: URIs for a while. We should
continue to favor HTTP URIs, since it's nice to be able to discover
things about an object you've shared the ID of. Where that's not
possible, this makes nicer tag URIs.
2010-02-20 13:23:08 -05:00
Brion Vibber 07f145049e Merge branch 'master' into testing 2010-02-17 16:52:13 -08:00
Brion Vibber ce6be4f836 Queues: redid the breakout control model so we can start up and subscribe to queues without running through the complete site list, which is ok at 1k sites but too slow at 10k.
All breakout queues that we're going to need to listen to now need to be explicitly listed in $config['queue']['breakout'].

Until XMPP is moved to component model, this setting will let the individual processes work with their own queues:
$config['queue']['breakout'][] = 'xmpp/xmppout/' . $config['site']['nickname'];
2010-02-17 16:49:00 -08:00
Brion Vibber d5cbfe8071 Merge branch 'testing' into 0.9.x
Conflicts:
	lib/iomaster.php
2010-02-16 09:25:09 -08:00
Brion Vibber 81b6b58e33 Merge branch 'master' into testing
Conflicts:
	lib/stompqueuemanager.php
2010-02-16 09:22:02 -08:00
Brion Vibber c74aea589d Stomp queue restructuring for mass scalability:
- Multiplexing queues into groups and for multiple sites.
- Sharing vs breakout configurable per site and per queue via $config['queue']['breakout']
- Detect how many times a message is redelivered, discard if it's killed too many daemons
 - count configurable with $config['queue']['max_retries']
 - can dump the items to files in $config['queue']['dead_letter_dir']

Queue daemon memory & resource leak fixes:
- avoid unnecessary reconnections to memcached server (switch persistent connections back in on second initialization, assuming it's child process)
- monkey-patch for leaky .ini loads in DB_DataObject::databaseStructure() - was leaking 200k per active switch
- applied leak fixes to Status_network as well, using intermediate base Safe_DataObject for both it and Memcache_DataObject

Misc queue fixes:
- correct handling of child processes exiting due to signal termination instead of regular exit
- shutdown instead of infinite respawn loop if we're already past the soft memory limit at startup
- Added --all option for xmppdaemon... still opens one xmpp connection per site that has xmpp active

Cache updates:
- add Cache::increment() method with native support for memcached atomic increment
2010-02-16 09:16:51 -08:00
Brion Vibber 122c8677b7 Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x 2010-02-12 11:18:35 -08:00
Evan Prodromou 31461e120f let files go to SSL dir too 2010-02-11 17:06:57 -05:00
Evan Prodromou 3018683718 let backgrounds be put under SSL 2010-02-11 17:03:31 -05:00
Evan Prodromou b96af33d97 put Javascript files under SSL 2010-02-11 16:59:39 -05:00
Evan Prodromou d6869cde7b let avatars be served over SSL 2010-02-11 16:51:15 -05:00
Evan Prodromou 5175b5062e default theme ssl to null 2010-02-11 16:48:15 -05:00
Evan Prodromou a6ab9c4a3e Themes can be served from an SSL server 2010-02-11 16:42:58 -05:00
Brion Vibber e856af34c3 Configurable delay between queuedaemon.php spawns/respawns to help stagger out startups and subscriptions. Defaults to 1 second.
$config['queue']['spawndelay'] = 1;
2010-02-09 14:27:33 -08:00