Commit graph

78 commits

Author SHA1 Message Date
redmatrix
191cd21028 more perms work 2016-07-13 23:05:19 -07:00
redmatrix
47fc0c7958 add new connection to default group when auto-accepted 2016-06-15 05:28:16 -07:00
redmatrix
80f2ba640e code cleanup 2016-05-24 20:49:23 -07:00
redmatrix
1cb311cef9 finish updating zot_finger instances 2016-05-21 18:18:33 -07:00
redmatrix
a2cec8899a daemon conversion continued... 2016-05-19 22:26:37 -07:00
redmatrix
28599fe652 more federation work 2016-03-20 21:41:19 -07:00
redmatrix
f82afca84d no xchan here if using zot protocol 2016-03-17 12:15:28 -07:00
redmatrix
a83cdbeb39 typo 2016-03-16 22:02:19 -07:00
redmatrix
38eb79705e lots of work on federated channel discovery 2016-03-16 18:00:13 -07:00
redmatrix
cf5df259e5 refresh issue 2015-12-27 21:08:28 -08:00
redmatrix
72edc9cd6c start working on the singleton setting 2015-12-09 18:30:30 -08:00
redmatrix
f0a33c00bc separate permission_update notification into permission_create and permission_update, since some networks send out a notification for duplicate share requests even if connected. 2015-10-18 20:13:12 -07:00
redmatrix
76d41fc250 re-organise the protocol disabled logic 2015-10-18 15:49:52 -07:00
redmatrix
b737e224b1 more work separating Diaspora from core 2015-08-03 16:52:51 -07:00
redmatrix
be0459a98b convert the abook fields 2015-06-14 21:08:00 -07:00
redmatrix
b2c5020af7 diaspora disallowed by default 2015-06-10 18:51:39 -07:00
redmatrix
d08c43d80c toggle diaspora protocol on a per-channel level in addition to the existing per site setting. Default is enabled if the site setting is enabled. 2015-06-09 18:50:11 -07:00
Alexandre Hannud Abdo
904596c7da Fix missing value in insert for default closeness 2015-03-09 03:07:48 -03:00
friendica
b5683bfac4 change default affinity (abook_closeness) to 80 for all new connections going forward (was 99). This way it can be adjusted down later without requiring you to change all your existing connections upward (since your existing connections are likely all sitting at 99 at the moment). The default setting is also configurable with a pconfig system.new_abook_closeness 2015-03-08 14:11:38 -07:00
friendica
a496036066 local_user => local_channel 2015-01-28 20:56:04 -08:00
friendica
4ca2ec7638 rework the new connection stuff so we don't need a "permissions have been changed but not saved" message. 2015-01-25 13:30:40 -08:00
friendica
39459c2d65 undo these bits of trinidad - we're going to do things differently 2015-01-05 18:22:15 -08:00
friendica
5cfe051139 initial trinidad checkin 2014-12-29 23:48:04 -08:00
Habeas Codice
ac27db22c1 Merge remote-tracking branch 'upstream/master'
Conflicts:
	boot.php
	include/dba/dba_driver.php
	include/diaspora.php
	include/follow.php
	include/session.php
	include/zot.php
	mod/photos.php
	mod/ping.php
2014-11-13 13:06:31 -08:00
Habeas Codice
1a5a5c7edb PostgreSQL support initial commit
There were 11 main types of changes:
- UPDATE's and DELETE's sometimes had LIMIT 1 at the end of them. This is not only non-compliant but
it would certainly not do what whoever wrote it thought it would. It is likely this mistake was just
copied from Friendica. All of these instances, the LIMIT 1 was simply removed.
- Bitwise operations (and even some non-zero int checks) erroneously rely on MySQL implicit
integer-boolean conversion in the WHERE clauses. This is non-compliant (and bad programming practice
to boot). Proper explicit boolean conversions were added. New queries should use proper conventions.
- MySQL has a different operator for bitwise XOR than postgres. Rather than add yet another dba_
func, I converted them to "& ~" ("AND NOT") when turning off, and "|" ("OR") when turning on. There
were no true toggles (XOR). New queries should refrain from using XOR when not necessary.
- There are several fields which the schema has marked as NOT NULL, but the inserts don't specify
them. The reason this works is because mysql totally ignores the constraint and adds an empty text
default automatically. Again, non-compliant, obviously. In these cases a default of empty text was
added.
- Several statements rely on a non-standard MySQL feature
(http://dev.mysql.com/doc/refman/5.5/en/group-by-handling.html). These queries can all be rewritten
to be standards compliant. Interestingly enough, the newly rewritten standards compliant queries run
a zillion times faster, even on MySQL.
- A couple of function/operator name translations were needed (RAND/RANDOM, GROUP_CONCAT/STRING_AGG,
UTC_NOW, REGEXP/~, ^/#) -- assist functions added in the dba_
- INTERVALs: postgres requires quotes around the value, mysql requires that there are not quotes
around the value -- assist functions added in the dba_
- NULL_DATE's -- Postgres does not allow the invalid date '0000-00-00 00:00:00' (there is no such
thing as year 0 or month 0 or day 0). We use '0001-01-01 00:00:00' for postgres. Conversions are
handled in Zot/item packets automagically by quoting all dates with dbescdate().
- char(##) specifications in the schema creates fields with blank spaces that aren't trimmed in the
code. MySQL apparently treats char(##) as varchar(##), again, non-compliant. Since postgres works
better with text fields anyway, this ball of bugs was simply side-stepped by using 'text' datatype
for all text fields in the postgres schema. varchar was used in a couple of places where it actually
seemed appropriate (size constraint), but without rigorously vetting that all of the PHP code
actually validates data, new bugs might come out from under the rug.
- postgres doesn't store nul bytes and a few other non-printables in text fields, even when quoted.
bytea fields were used when storing binary data (photo.data, attach.data). A new dbescbin() function
was added to handle this transparently.
- postgres does not support LIMIT #,# syntax. All databases support LIMIT # OFFSET # syntax.
Statements were updated to be standard.

These changes require corresponding changes in the coding standards. Please review those before
adding any code going forward.

Still on my TODO list:
- remove quotes from non-reserved identifiers and make reserved identifiers use dba func for quoting
- Rewrite search queries for better results (both MySQL and Postgres)
2014-11-13 12:21:58 -08:00
friendica
3b22e2f5f5 some minor cleanup of unreported (and as yet undiscovered) issues with permissions toggling. No smoking guns and no obvious issues discovered here. Repeated and tried to duplicate zottell's issue as described without seeing any obvious problems. 2014-11-05 16:21:03 -08:00
friendica
d5d6158973 ok heads up - potentially destabilising change. I've tried to sort out all the default connection permissions for those who don't have a predefined (or therefore have a "custom") permissions role. Unfortunately this includes most people that were using this software more than a month ago. The real changes are that the SELF address book entry no longer holds "auto-permissions" but instead holds your "default permissions" (if you have a pre-defined role, the defaults will be pulled from the role table).
The auto permissions have moved to a pconfig (uid.system.autoperms). A DB update will move these settings into their new homes.

What used to be the "Auto-permissions settings" page is now the "default permissions settings" page and a checkbox therein decides whether or not to apply the permissions automatically. A link to this page will only be shown when you have the "custom" role selected.

With luck nobody will notice anything wrong. But at least for the next few days, please review permissions that have been assigned to new connections (either automatically or manually) and make sure they make sense (e.g. they aren't "nothing"). You still need to take action when seeing a message "permissions have changed but not yet submitted" as we always let you review and perhaps adjust the settings _before_ a connection is established (unless you have autoperms turned on).
2014-11-04 17:11:02 -08:00
friendica
d9c5823593 the default permissions for new connections when using a custom role is inadequate. Until we can make it configurable start off with something like a public social role. We're typically taking the person straight to the connection editor so they can change it before any privacy damage is done 2014-10-28 19:29:37 -07:00
friendica
9cc76cb33d several unrelated things - auto_follow wasn't working for new accounts, error returned in private mention to a collection, and added auto-completion to photo tags; though it only matches people so the hover text is now wrong. Also made the photo edit form XHTML (XML) compliant. 2014-10-27 19:23:40 -07:00
friendica
467c6c72f0 ability to pre-populate connections for new channels. e.g. "MySpace Tom" 2014-10-01 14:48:08 -07:00
friendica
81ee35e03b fix url mismatches of a single trailing slash for feed author/owner comparisons; update diaspora_compat 2014-09-23 20:55:22 -07:00
friendica
09b5bbb032 feeds with '@' in the URL were being handled as webfinger addresses and didn't fall through to RSS discovery. Issue #599 2014-09-21 14:46:12 -07:00
friendica
4014093572 implement permission roles - the backend should be done except for maybe a couple of small tweaks. Now we just need to define the rest of the roles and create a chooser for them. Adam started on this some time back but I don't know where that has gone. 2014-09-17 17:59:46 -07:00
friendica
d1dfddbe80 allow feeds to be sourced 2014-09-04 16:51:24 -07:00
friendica
ca2bf76b06 allow stuff with Diaspora authors to federate in zot conversations even if the local site has diaspora disabled. This way it won't look like folks are talking to themselves. 2014-09-04 01:13:01 -07:00
friendica
688722de5b fix phantom attachments in feeds 2014-09-01 20:59:53 -07:00
friendica
f64abf3ad8 logic inverted 2014-09-01 20:41:05 -07:00
friendica
76a72a997d honour the feed_contacts setting 2014-09-01 04:17:10 -07:00
friendica
2a37d99958 get out the sunnies 2014-08-31 22:15:00 -07:00
friendica
89d5c42df1 service class check for feeds. Note limit is account based, not channel based. 2014-08-31 19:30:35 -07:00
friendica
f8e6395ef3 rss feed discovery 2014-08-31 18:50:30 -07:00
friendica
e0ee66d0b4 Add d* folks to address book. WARNING - DO NOT ATTEMPT THIS. LEAVE IT THE FRUCK ALONE until the feature is stable. I won't help you if you try this and end up with a borked site. You are completely on your own. 2014-08-24 17:52:26 -07:00
friendica
10167fdf51 prevent follows of and notifications to deceased channels 2014-04-07 02:55:00 -07:00
friendica
b3ce1cd87b project "snakebite" 2014-02-17 16:00:17 -08:00
friendica
f2435ed4cd follow and accept_follow hooks 2013-11-21 17:49:14 -08:00
friendica
d7ee552c57 Protocol: now set data['alg'] on all encapsulated encrypted packets, so that we can more easily retire 'aes256cbc' once it is no longer viable. 2013-11-20 15:20:12 -08:00
friendica
22b6ddef94 add zid to connect_url 2013-08-22 00:44:24 -07:00
friendica
925b046794 premium/restricted channel connections implemented, configure at yoursite/channel/nickname - this basically redirects "follow" requests to a premium channel's sell page if it has one configured. You can still click through and create a connection request (introduction), but this provides a means for the channel owner to state their terms. If you don't abide by the terms, you will likely be blocked or the channel deleted. This facility is extensible in a number of ways. 2013-08-21 22:10:08 -07:00
friendica
20f3d09708 some sane permission defaults. 2013-08-18 20:20:03 -07:00
friendica
52acfce84b some auto-friending cleanups 2013-05-19 20:38:53 -07:00