Commit graph

848 commits

Author SHA1 Message Date
redmatrix
3a9139f76e there was a reason we included that file 2015-05-28 22:06:22 -07:00
redmatrix
851f2f64df Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	index.php
	mod/setup.php
2015-05-24 15:50:05 -07:00
Klaus
1ce3d01bb8 Merge pull request #332 from solstag/zotfeedcleanup
Import security only when necessary, use correct variable in log
2015-05-24 03:12:25 +02:00
redmatrix
7f9e4d6add federation problem from diaspora comments relayed through red channels due to typo 2015-05-23 15:24:16 -07:00
Alexandre Hannud Abdo
760f17b173 Import security only when necessary, use correct variable in log
Just some cleanup, seemed like the intent of previous changes was so
2015-05-22 10:27:17 -03:00
redmatrix
3763f74a10 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	include/items.php
	include/text.php
	mod/item.php
	view/nl/messages.po
2015-05-20 20:49:06 -07:00
redmatrix
c10a4ca9c7 re-arrange the html cache a bit 2015-05-20 20:28:16 -07:00
redmatrix
62df06b3d6 cloning abook entries was broken in several ways if the target xchan wasn't available on the clone site. This should make it less broken. 2015-05-20 20:20:35 -07:00
redmatrix
0826c5fd96 don't allow item_id to update without a valid post id 2015-05-20 19:18:32 -07:00
redmatrix
6466774b6e PRIVACY: possible privacy leakage under a defined set of circumstances 2015-05-20 18:46:23 -07:00
redmatrix
507dfb9f85 add rot47 to the mix. This shouldn't affect the speed to any measurable degree. 2015-05-19 21:51:48 -07:00
redmatrix
77e2ef45f0 mail_obscure - AES-256 is way too slow, simplify. Ideally a substitution cipher would be adequate for our requirements. 2015-05-19 02:16:12 -07:00
redmatrix
a6cb90c81c Merge branch 'master' into tres
Conflicts:
	include/Import/refimport.php
	include/activities.php
	include/attach.php
	include/event.php
	include/externals.php
	include/identity.php
	include/items.php
	include/notifier.php
	include/photos.php
	include/taxonomy.php
	include/zot.php
	mod/channel.php
	mod/connedit.php
	mod/events.php
	mod/item.php
	mod/like.php
	mod/manage.php
	mod/mood.php
	mod/ping.php
	mod/poke.php
	mod/subthread.php
	mod/tagger.php
	mod/thing.php
2015-05-14 18:02:29 -07:00
redmatrix
475dc7b686 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	boot.php
	include/api.php
	include/enotify.php
2015-05-13 17:07:12 -07:00
redmatrix
d6f98e6511 product was a bad string to use because we may require it for e-commerce, and RED_PLATFORM is equally problematic for other reasons. 2015-05-13 16:01:00 -07:00
redmatrix
25b599a4bd convert ITEM_WALL from bitfield to standalone 2015-05-06 21:03:33 -07:00
redmatrix
f17c1f9694 no need to obscure the diaspora signature if we're not obscuring the posts 2015-05-06 18:38:30 -07:00
redmatrix
c9ec4f46b6 for hubzilla we won't be obscuring items, only private mail, this will allow us to search and cache private posts 2015-05-05 18:36:05 -07:00
friendica
c4221f3273 Merge branch 'master' into tres
Conflicts:
	include/notifier.php
2015-04-29 21:49:43 -07:00
friendica
268307b534 zotfeed issues 2015-04-24 15:01:37 -07:00
friendica
41343b32c5 block unfederated posts from zot_feed 2015-04-23 21:45:42 -07:00
friendica
6679734135 Merge branch 'master' into tres
Conflicts:
	include/Contact.php
	include/ItemObject.php
	include/api.php
	include/attach.php
	include/diaspora.php
	include/dir_fns.php
	include/enotify.php
	include/event.php
	include/expire.php
	include/items.php
	include/notifier.php
	include/notify.php
	include/photos.php
	include/taxonomy.php
	include/text.php
	include/widgets.php
	include/zot.php
	mod/admin.php
	mod/channel.php
	mod/dirsearch.php
	mod/display.php
	mod/editwebpage.php
	mod/events.php
	mod/home.php
	mod/item.php
	mod/manage.php
	mod/mood.php
	mod/network.php
	mod/page.php
	mod/photos.php
	mod/ping.php
	mod/post.php
	mod/thing.php
	mod/viewsrc.php
	view/css/mod_events.css
2015-04-23 19:49:41 -07:00
friendica
53339d19a3 issue #176, sender copy of item not obscured if using private mention 2015-04-20 20:14:07 -07:00
friendica
9942dec09c match parens 2015-04-14 20:52:07 -07:00
friendica
32acb7f6e1 post_activity_item incorrectly setting the obj_type when a valid type was specified 2015-04-14 20:50:38 -07:00
Klaus Weidenbach
fdd6508019 Some documentation and whitespaces at line endings. 2015-04-10 00:28:23 +02:00
friendica
37afc81847 update features, allow sys account page deletion 2015-04-08 17:54:52 -07:00
Klaus Weidenbach
d0361582b0 Correcting reported Doxygen syntax warnings.
Fixed wrong Doxygen syntax and add some of the available FIXME to
Doxygen documentation.
Updated Doxygen configuration to add also all capital letter tags.
Adding some more Doxygen documentation.
2015-03-29 22:23:00 +02:00
friendica
76a6739b93 remove bogus grouping from fix for #938 2015-03-28 18:47:28 -07:00
friendica
1e4490079b issue #938 2015-03-28 18:45:58 -07:00
friendica
022305fe83 also allow service classes to set post expiration. These take priority over the site default. 2015-03-24 20:38:53 -07:00
friendica
63b8020969 more work on expiration, make system limits useful - even in retrospect 2015-03-24 17:09:42 -07:00
friendica
3d60008842 provide a site-wide expiration policy without loopholes - still need work to reduce the impact of expiration queries. 2015-03-24 15:53:55 -07:00
friendica
00b3c4c881 sql errors on postgres with yestderday's optimisation 2015-03-24 12:40:55 -07:00
friendica
c2acab21d4 improve performance of the zotfeed queries 2015-03-23 19:56:10 -07:00
Mario Vavti
ead45292e1 some tabs title statuseditor restructuring 2015-03-21 00:06:18 +01:00
friendica
7af012b1f9 The random bad signatures are because something somewhere is trimming the body text. It could be any one of hundreds of functions that touch the message body. We really want to trim the body text, so I'm putting back all the trim statements - in mod/item and item_store and item_store_update. The last fix for random bad sigs noted that one of the trims wasn't there, so the others were removed. The correct fix is for all the trims to be there. We will probably have a few (quite a few) bad sigs during the transition back to trimmed text but this should nail it for anybody on recent code and with new content. 2015-03-17 00:13:47 -07:00
friendica
d83460cd2a The never ending saga of parent = 0 bugs on Dreamhost. 2015-03-01 18:58:50 -08:00
friendica
b9e485be54 this may actually fix the deliver loop when deleting existing items. It's hackish but I don't see any other way out. 2015-02-25 16:51:39 -08:00
friendica
b32841e2dd Found the cause of the delete looping, and I can prevent it going forward. The issue remains what to do about comments which are already in the DB and have ITEM_ORIGIN incorrectly set. We can't exactly reset them because the "original" context has been lost. (Sorry but couldn't resist an insider pun that none of you will be able to follow anyway). Read the comments. 2015-02-25 15:27:33 -08:00
friendica
1a071ea4f0 call post_local hooks prior to storing a post that is going to be sourced. There are some fields in the actual stored item that may change when we start the second delivery chain so a few plugins may not deal with these items correctly. Since we only source public items these effects will be slight. 2015-02-25 03:16:43 -08:00
Alexandre Hannud Abdo
8696795ce6 Fixes tag delivery regex for when multiple tags are present
Previous regex would cause matches to span several tags
when present, thus never recognizing the mention.
2015-02-13 07:10:29 -02:00
friendica
da2349bb6a provide relief to sites that are severely impacted by the slow ITEM_UNSEEN searches. This does not incorporate any other flag optimisations as that will require a major DB update and possibly involve significant downtime. This is just to bite off a little chunk now and provide some much needed relief. 2015-02-12 17:45:25 -08:00
Alexandre Hannud Abdo
6ec44793b3 Dot not trim body in order to avoid issues with signature checks 2015-02-12 05:44:24 -02:00
friendica
2b2fa5a973 issue #843 2015-02-11 20:38:06 -08:00
friendica
8c061f143f more efficient processing of response activities, plus a proof of concept fix for the problem of receiving a delete notification before we actually get the item which we're supposed to delete. 2015-02-11 15:26:35 -08:00
friendica
79223b6b3d item voting tools 2015-02-10 19:10:18 -08:00
friendica
4b348d2489 Merge branch 'master' into tres
Conflicts:
	view/css/mod_events.css
	view/theme/redbasic/css/style.css
2015-02-05 19:38:43 -08:00
friendica
043ff33e43 issue #889 private tags for forums no longer recognised after tag refactor a few weeks back. This solution is not optimal as it also leaves you in the privacy ACL in some cases and not in others but it restores the previous functionality 2015-02-02 14:59:01 -08:00
friendica
912be23e16 Merge branch 'master' into tres
Conflicts:
	include/group.php
	include/text.php
	mod/acl.php
	mod/channel.php
	mod/connections.php
	mod/display.php
	mod/group.php
	mod/item.php
	mod/locs.php
	mod/network.php
	mod/photos.php
	mod/ping.php
	mod/starred.php
	mod/viewsrc.php
2015-01-29 15:09:35 -08:00
friendica
ff68ea6087 more message restrict conversions 2015-01-29 14:51:41 -08:00
friendica
e157371c39 remote_user => remote_channel 2015-01-28 20:58:59 -08:00
friendica
a496036066 local_user => local_channel 2015-01-28 20:56:04 -08:00
friendica
db1998e0c8 limit the number of forums that can be tagged in a single post - default is 2. The reason is simple - count how many posts would be in transit simultaneously if this was unlimited and somebody tagged 40-50 forums. In practice when used legitimately - we've rarely seen more than two, in fact I don't recall seeing more than two ever. Typically it is one and occasionally two. Changing the default is tricky - a client system cannot do it, but the site hosting a forum can choose to. Since not all sites that host forums will choose to do so, the ordering of the mentions would then be important. 2015-01-28 14:22:52 -08:00
friendica
a2cdd1499c Merge branch 'master' into tres
Conflicts:
	include/socgraph.php
2015-01-27 20:00:43 -08:00
friendica
2f4ef7660c improved route mismatch detection. We will be less strict about the absolute route matching and only look at the last hop before it got to us - which is ultimately all we should care about (since that sender controls the thread permissions). Route mismatches seem to occur somewhat frequently from yamkote (for unknown reasons), and the logging has been improved a bit so it should provide some slightly more useful debugging info in case it still happens going forward. Oh, also we'll set the parent on comments when we store the initial post (item_store()) and only go back and set the parent for top-level posts. This should reduce the number of comments with missing parents on shared hosts, but may increase the number of missing threads. Probably worthwhile to do a query occasionally for parent = 0 and see how we're doing and how many have shared host related delivery issues. 2015-01-27 15:47:24 -08:00
friendica
ac594183c6 Merge branch 'master' into tres and add some work on the item_deleted flag refactor
Conflicts:
	include/attach.php
	include/onedirsync.php
	include/zot.php
	mod/locs.php
2015-01-26 18:27:03 -08:00
friendica
4c2a1e572a start on item_restrict conversion 2015-01-22 21:04:54 -08:00
friendica
6e0e3b2433 more expanding item flags 2015-01-22 18:41:10 -08:00
friendica
e46eba1258 heavy lifting converting item flag bits 2015-01-22 17:41:16 -08:00
friendica
29436081a8 slow progress removing bitfields on item table 2015-01-21 16:06:25 -08:00
friendica
168b67fa41 correct some activity object types (for comments), also fix a foreach warning resulting from recent tag work 2015-01-14 18:36:23 -08:00
friendica
25e090148d federate consensus items (in network only). Work in progress. 2015-01-14 14:15:04 -08:00
friendica
7090b58f68 check mentions against the appropriate xchan_url and not a hard-coded /channel/ string 2015-01-13 20:54:27 -08:00
friendica
66cef7531a don't wipe out the item body of a linked item to a photo when doing a normal delete and not forced 2015-01-12 16:36:10 -08:00
friendica
cdc52ba884 change deletion behaviour of linked photo items. Previously deleting the visible item in the conversation deleted the photo as well. Now photos must be deleted in the photos module. Deleting the linked item removes any attached conversation elements (likes, etc.) and sets the conversation item to hidden. This may create an issue in the future if we move the photo tags, title, or other photo elements to the linked item rather than the photo. Noting here so this can potentially be discovered and remembered at that time. 2015-01-12 16:27:27 -08:00
Stefan Parviainen
adc9564b5c Refactor mention code to make it more reusable 2015-01-12 20:01:07 +01:00
marijus
978d78b953 basic changes for file activity 2015-01-09 15:18:45 +01:00
friendica
aa490a39bb include channel clones in PM deliveries (also some whitespace edits) 2015-01-08 16:02:15 -08:00
Habeas Codice
ab5bf1b7d6 prevent database hackery from leaking over the wire 2014-11-22 11:54:40 -08:00
friendica
03a457ed83 more logging for zot_feed anomalies 2014-11-20 18:44:16 -08:00
friendica
18cae8a78c change logging of some troublesome or noisy bits so we can figure out what is really going on 2014-11-19 19:22:22 -08:00
friendica
af9015c8ed place holder 2014-11-17 18:29:57 -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
55f64c3736 tgroup_check - decrypt if obscured before checking body text for reshares 2014-11-07 13:06:56 -08:00
friendica
a6d8c3193a various UI issues related to having an enormous number of entries in the posted_date selector including years/months that had no posts 2014-11-03 14:49:03 -08:00
friendica
28a35261db What this checkin does is catch the case where a comment arrived and there's a missing top-level post to match it with. So we'll send a request back to the sender that you've never seen this thread and please send a fresh copy of the entire conversation to date. We could soon have posts in the matrix from different platforms from days gone by, which have been migrated into the modern world. We'll be polite and not deliver these to everybody. However, if someone comments on one of these antique threads we wouldn't be able to see it in our own matrix because we won't have a copy of the parent post. So this rectifies that situation. Be aware that item deletion may need to change to keep "hard deleted" items indefinitely so that they don't keep coming back. We'll have to null out the important data of the former item to accomplish the deletion aspect. 2014-10-30 19:15:03 -07:00
friendica
ce8a891682 doh - this needs to be markdown, not bbcode 2014-10-24 14:18:02 -07:00
friendica
1c4bbbd13e diaspora walltowall comment signature, force update. 2014-10-23 16:08:29 -07:00
Thomas Willingham
f29c5a35f1 Provide comment box for PERMS_AUTHED items. Presently only commentable from owners wall. 2014-10-23 21:50:53 +01:00
friendica
58c692e389 improved wall-to-wall detection for comments so we can handle Diaspora signing and wall-to-wall attribution correctly.
Do it at the point of submission. This also fixes a potential bug in yesterday's wall-to-wall permission setting,
if it was a local comment to a remote post.
2014-10-22 20:39:49 -07:00
friendica
d7cb5c0436 you've gotta' be on your toes to catch this bug... though it's been here for about 2 1/2 years and even survived a rewrite. Symptoms are that the archive widget only lists one month (the month when you first posted), and only if your first post was written between the 28th and 31st of whatever month that was. 2014-10-22 16:41:06 -07:00
friendica
ed7712cfbf private forum issues 2014-10-21 16:33:35 -07:00
friendica
4bf758cc5b content deletion issue 2014-10-12 01:40:48 -07:00
friendica
b5f91d7b40 missing source route after edit 2014-10-10 14:45:18 -07:00
friendica
4634049549 allow (our own) ajax urls to pass through bbcode intact. 2014-10-09 20:59:33 -07:00
friendica
6806888fa4 return of the missing diaspora wall-to-wall attribution 2014-10-09 03:36:50 -07:00
RedMatrix
98af2de9b4 Merge pull request #626 from habeascodice/master
regex missing terminator char
2014-10-08 23:30:24 +11:00
friendica
16b94f1dc0 issues with diaspora comment signatures on relayed comments that are relayed through a redmatrix site (parent post is redmatrix) and involve a private post. 2014-10-02 02:43:07 -07:00
habeascodice
e62a95aaba regex missing terminator char 2014-09-29 15:41:47 -07:00
friendica
d8c03526ed optionally include wall items (posts) in import/export 2014-09-25 20:21:23 -07:00
Thomas Willingham
e75f1ccb2e Typo 2014-09-25 19:47:06 +01:00
friendica
24d402941f if no rss/atom element author, use feed level contact 2014-09-24 14:27:18 -07:00
friendica
c76b8febaa make it the default 2014-09-24 02:18:13 -07:00
friendica
95470a9f9b one step closer 2014-09-24 02:08:35 -07:00
friendica
be54f0d9e6 more testing 2014-09-24 01:58:24 -07:00
friendica
87b8e2725c just an experiment - don't do anything with this until I'm finished with it. 2014-09-24 01:45:57 -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
f203d2a3b0 diaspora private mail seems to work now - but there's an obfuscation leak via the conversation structure that needs to be dealt with. 2014-09-23 20:36:10 -07:00