summaryrefslogtreecommitdiff
path: root/lib/util.php
AgeCommit message (Collapse)Author
2010-12-06Added User::singleUserNickname() as (temporary?) fallback for single-user ↵Brion Vibber
lookup as a workaround for site setup of 1user sites. We found that an external tool attempting to spin up StatusNet and then register the user would fail because StatusNet's router setup dies on being unable to find its single-user account, since the nickname is needed in setting up routing entries. This tweak will let it survive, using the configured setting as a fallback if it can't actually find the user account.
2010-10-26Set cookies with "secure" flag on SSL sites. Improves security.testingCraig Andrews
2010-10-25Forgot to add the OAuth verifier pin page to sensitive arrayZach Copley
2010-10-25We don't need to have editapplication (only showapplication) in theZach Copley
sensitive array because it doesn't expose the consumer keypair
2010-10-25Add OAuth token exchange endpoint to 'sensitive' array; i.e.: use SSL ifZach Copley
available
2010-10-20Fix for ticket #2845: singleuser nickname configuration was being overridden ↵Brion Vibber
by site owner in router setup. I've consolidated the checks for which user to use for single-user mode into User::singleUser(), which now uses the configured nickname by preference, falling back to the site owner if it's unset. This is now called consistently from the places that needed to use the primary user's nickname in routing setup. Setting $config['singleuser']['nickname'] should now work again as expected.
2010-10-18options to nofollow external links in noticesEvan Prodromou
2010-10-07Workaround for regression in input validation due to more PCRE oddities. ↵Brion Vibber
Recommend redoing common_validate_utf8() using something more reliable, perhaps. :P
2010-10-06Basic validation of UTF-8 input via GET/POST vars: invalid UTF-8 sequences ↵Brion Vibber
will cause the string to drop. Not necessarily super-thorough; should be improved in future to drop individual bad sequences, do normalization of combining forms, etc. General input validation (for ints, types of strings, etc) still would be good to have!
2010-09-20Don't spew a notice warning to output while processing logging for PEAR DB ↵Brion Vibber
errors
2010-09-20Ticket #2750: fixes to HTTP caching behavior across login/logout boundariesBrion Vibber
* now ignoring if-modified-since if we failed an etag if-none-match comparison, per spec * now including a hash of user id/nickname in most etags, so we'll update the view properly after login/logout For API methods, checking the API-auth'ed user. (Many change results to include things like 'you're subscribed to this user' or 'this is one of your favorites', so user info is again needed) There'll still be some last-modified stamps that aren't including user info properly, probably.
2010-09-16Add plural support for minutes/hours/days/months ago.Siebrand Mazeland
Reapply of revised b27882c9166191de4aaea298ba1b1a524cfe9ac7 that was reverted by Brion Vibber in 2d4c0f9a47f6534c578a37abe79670cec699caae.
2010-09-15Revert "Add plural support for minutes/hours/days/months ago." -- currently ↵Brion Vibber
doesn't work and spews error messages This reverts commit b27882c9166191de4aaea298ba1b1a524cfe9ac7.
2010-09-13Remove trailing whitespace and update comment consistency on methods.Siebrand Mazeland
2010-09-13Add plural support for minutes/hours/days/months ago.Siebrand Mazeland
2010-09-02Fix for #2635: use ssl-sometimes settings for Twitter settings & auth pagesBrion Vibber
2010-08-12Fix for ticket 2513: "Can't linkify" error when some links are shortenedBrion Vibber
When bogus SSL sites etc were hit through a shortening redirect, sometimes link resolution kinda blew up and the user would get a "Can't linkify" error, aborting their post. Now catching this case and just passing through the URL without attempting to resolve it. Could benefit from an overall scrubbing of the freaky link/attachment code though...! :) http://status.net/open-source/issues/2513
2010-07-12Ticket 2433: Skip locale fallback list check on Windows ('locale -a' ↵Brion Vibber
shell-out doesn't work there)
2010-06-07Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.xBrion Vibber
Conflicts: plugins/OpenID/openid.php
2010-06-03Skip enqueueing to outgoing bridges on incoming remote messages. Twitter, ↵Brion Vibber
Facebook, RSSCloud, and OStatus checks were enqueued on these when they'd never do anything but churn the queue servers. Notice::isLocal() can replace a number of manual checks for $notice->is_local being LOCAL_PUBLIC or LOCAL_NONPUBLIC.
2010-05-21Merge branch 'testing' into 0.9.xBrion Vibber
2010-05-19Quick fix for creating OpenID accounts authenticating against a MediaWiki ↵Brion Vibber
site; trim the 'User:' etc from the final path segment before generating a nickname from it. Avoids ending up with nicks like 'userbrion' on your first OpenID login!
2010-05-19Merge branch 'testing' into 0.9.xBrion Vibber
Conflicts: plugins/OpenID/openidlogin.php
2010-05-19Locale switch cleanup: use common_switch_locale() which is safer for ↵Brion Vibber
updating gettext state. Also moved a few calls to reduce chance of hitting an exception before switching back. Should help with problems where xmppdaemon would get stuck in wrong locale.
2010-05-14Merge branch 'testing' into 0.9.xBrion Vibber
2010-05-11Windows server fix: Use platform EOL in debug log fileBrion Vibber
2010-04-21add 'always' parameter to common_shorten_linksCraig Andrews
2010-04-20Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.xBrion Vibber
2010-04-20Merge branch 'master' of gitorious.org:statusnet/mainline into testingBrion Vibber
2010-04-20Fix email notifications for @-replies that come via OStatus.Brion Vibber
* Moved notification sending from Notice::saveReplies to distrib queue handler, so it'll pull from the reply set we've saved regardless of how we got it. * Set up gettext infrastructure for command-line scripts; gets localization mail notifications etc working from background queues. * Adjusted locale switching: common_switch_locale() works at runtime for bg scripts, forces a message catalog update
2010-04-11Add translator documentation and FIXMEs that plural support should be added ↵Siebrand Mazeland
for some messages.
2010-04-09Merge branch 'testing' into 0.9.xBrion Vibber
2010-04-08Maintain 'page' parameter for block from subscribers list, block & ↵Brion Vibber
make-admin from group members list. Refactored some of the returnto handling code. It looks like we have several different ways of handling this in the software, icky! Marked the session-based functions with fixmes (they'll stomp on other forms when multiple tabs/windows are used) and combined some commonish bits of code between ProfileFormAction and the group block & makeadmin actions where they're using hidden form parameters. Extended that to allow passing dynamic parameters (eg 'page') as well as static ones (action, target user/group).
2010-04-08In single-user mode, link #hashtags to the user's tagged stream rather than ↵Brion Vibber
the global tag action, which isn't registered. Previously they would end up pointing to the home URL.
2010-04-08Revert "scripts/strip_geo.php to remove geodata from notices by a given ↵Brion Vibber
user/profile." This reverts commit ab20e75ff8feab01b4fec81c02b8b4039d65cca0. Accidentally removed another commit; clearing up...
2010-04-08scripts/strip_geo.php to remove geodata from notices by a given user/profile.Brion Vibber
May be slow or run out of memory if run on particularly prolific posters -- not yet optimized for that case. Note that geodata that has already been sent out to other services (via ostatus, omb, twitter, etc) will not be removed from them.
2010-04-08In single-user mode, link #hashtags to the user's tagged stream rather than ↵Brion Vibber
the global tag action, which isn't registered. Previously they would end up pointing to the home URL.
2010-03-31Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.xBrion Vibber
2010-03-30Ticket #1281: JID validation now more or less follows spec instead of ↵Brion Vibber
calling e-mail validator Basic splitting/validation code submitted via http://status.net/wiki/XMPP/JID_validation -- Copyright 2009 Patrick Georgi <patrick@georgi-clan.de> Licensed under ISC-L, which is compatible with everything else that keeps the copyright notice intact. Added PEAR Net_IDNA package to extlib to handle IDN normalization (also used by Validate's email verifier if present). * added test suite, supplemented my own test cases with JID validation and normalization test cases from libpurple * follows XMPP rules for validation of name part * fixes for normalization with non-ASCII names * will do domain checks if $config['email']['check_domain'] is on, checking for an XMPP-server SRV record or any lookup. (We don't actually need to ping those direct though.) * some more obscure stringprep validation rules aren't quite followed yet, but we err on the side of permissiveness. * we still don't actually let you save your address with a resource on it, as we strip resources when looking up users who've sent us presence or message updates. I would recommend saving the outgoing resource as a separate field if/when we add that..?
2010-03-26if there is oembed data for a file/link, consider that link to have an ↵Craig Andrews
attachment
2010-03-23Merge branch 'master' of git@gitorious.org:statusnet/mainline into testingBrion Vibber
2010-03-23Don't add PHPSESSID parameter onto notice and conversation URIs if we save a ↵Brion Vibber
notice during a session override. This was being triggered by welcomebot messages created at account creation time, then propagated through replies.
2010-03-23Don't add PHPSESSID parameter onto notice and conversation URIs if we save a ↵Brion Vibber
notice during a session override. This was being triggered by welcomebot messages created at account creation time, then propagated through replies.
2010-03-10Merge branch 'testing' into 0.9.xBrion Vibber
Conflicts: actions/apistatusnetconfig.php
2010-03-10A blank username should never be allowed.Zach Copley
2010-03-09Ticket #2210: adjust locale setup fallback to try more locales on the system ↵Brion Vibber
if en_US isn't available. We just need *something* other than C or POSIX to let gettext initialize itself, apparently... Gets Spanish, French, Russian etc UI localization working on Debian Lenny fresh installation set up in Spanish (so es_ES.UTF-8 is available but en_US.UTF-8 isn't).
2010-03-08make common_copy_args() work when the post/get request includes arrays (form ↵Craig Andrews
elements with names ending in [] having multiple values)
2010-03-03Language setting fixes:Brion Vibber
- 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-03Use poster's subscribed groups to disambiguate group linking when a remote ↵Brion Vibber
group and a local group exist with the same name. (If you're a member of two groups with the same name though, there's not a defined winner.)
2010-03-02Updated some references to the long gnone "isEnclosure" function to the new ↵Craig Andrews
"getEnclosure"