Commit graph

423 commits

Author SHA1 Message Date
redmatrix
9fa0490c44 sync posted top level items rather than deliver them (actually we do both, but sync comes first). This way we get the ACL transferred. 2015-09-07 18:11:30 -07:00
redmatrix
7975bc828f typo 2015-06-23 16:22:21 -07:00
redmatrix
45d66657d7 Merge pull request #356 from solstag/signature_edit_fix
properly trims edited posts before signing so signature verification …
2015-06-23 14:47:59 +10:00
Alexandre Hannud Abdo
a189fc0872 properly trims edited posts before signing so signature verification works 2015-06-23 01:08:02 -03:00
redmatrix
9879cf3c6c ensure we always sign a trimmed item body. 2015-06-22 16:09:02 -07:00
Alexandre Hannud Abdo
a31fdd3fbb correctly fix attachment permissions from private mentions
by postponing code that removes the attachment tag from the body
2015-06-10 15:37:10 -03:00
redmatrix
e3606ec56f move the photo and attachment permission syncing past the tag replacement so that attachments get the correct permissions when private mentions are used. 2015-06-01 16:26:12 -07:00
redmatrix
81d94dae2c preserve lock on edited comments 2015-05-21 02:03:44 -07:00
redmatrix
6466774b6e PRIVACY: possible privacy leakage under a defined set of circumstances 2015-05-20 18:46:23 -07:00
friendica
53339d19a3 issue #176, sender copy of item not obscured if using private mention 2015-04-20 20:14:07 -07:00
Mario Vavti
9addc4581e provide a separate input field for rpost attachments 2015-04-16 23:26:11 +02:00
friendica
d3bc721138 item_check_service_class wasn't returning correct results 2015-04-13 16:03:09 -07:00
friendica
37afc81847 update features, allow sys account page deletion 2015-04-08 17:54:52 -07:00
friendica
0bb89778d3 add channel_lastpost timestamp to help optimise some outrageously expensive queries. 2015-03-26 19:55:52 -07:00
friendica
f1a1660709 item_check_service_class - the join is totally unnecessary 2015-03-25 19:13:53 -07:00
friendica
62b2fa6ac7 operation snakebite, cont. 2015-03-22 20:30:23 -07: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
53e908d7b7 when fixing "naked links" make sure not to double link double urls as seen in archive.org - which has the complete unescaped target url, scheme and all, as part of its own. 2015-03-06 20:45:26 -08:00
friendica
7ad425bbda failure to auto update comments if it's your own. 2015-02-14 21:57:47 -08:00
friendica
4b513d3322 issue #896 2015-02-12 19:22:07 -08:00
friendica
084ca3f4a1 typo 2015-02-12 18:49:42 -08: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
friendica
79223b6b3d item voting tools 2015-02-10 19:10:18 -08:00
friendica
b8add899a2 undo extra logging 2015-02-08 19:28:18 -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
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
7a24943c34 some back-end code to support location activity objects. Work in progress. 2015-01-14 14:46:01 -08:00
friendica
dfdef0af0d provide a setting to control ALLOWCODE permissions at the channel level - it isn't always appropriate to apply this to all channels in an account. 2015-01-13 18:30:30 -08:00
Stefan Parviainen
93735df2c7 Allow tags in mail, many profile fields, and admin info 2015-01-13 17:54:40 +01:00
Stefan Parviainen
adc9564b5c Refactor mention code to make it more reusable 2015-01-12 20:01:07 +01:00
friendica
68c612c597 fix shares that are processed with markdown (regression, this was pulled from diaspora2bb a couple weeks back as it was affecting diaspora input, but here we're dealing with red input only) 2015-01-01 22:30:54 -08:00
friendica
50943f439c issue #777, make photo cache time configurable, read the comments. 2014-12-27 18:19:51 -08:00
Stefan Parviainen
62dabecf97 Show tags in other channels profile field to make it easier to navigate to the channels 2014-12-07 16:19:22 +01: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
37742be6af some more work on sys publishing 2014-11-11 18:57:59 -08:00
friendica
570577a990 a couple of places where we need to look for a sys channel euid. 2014-11-11 18:05:50 -08:00
friendica
a80e696b77 wall posted comment to a top-level wall post which arrived via a route (e.g. was posted to a forum) had no route, hence downstream recipients report route mismatch 2014-11-03 17:35:42 -08:00
friendica
7d9f785758 if any privacy tags are created on a top level post, restrict the post; since it could have been quite sensitive. If there were errors processing the actual tag restrict the post to the profile owner. Also make the "privacy tag over-rides ACL" behaviour configurable. Default is that privacy tags over-ride the ACL. 2014-10-28 20:01:44 -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
Thomas Willingham
38801f802f Issue #661 2014-10-24 17:46:31 +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
ed7712cfbf private forum issues 2014-10-21 16:33:35 -07:00
friendica
3d0d36b2bc fix diaspora reshare tags 2014-10-10 19:14:37 -07:00
friendica
191ef124cf add 'nopush' option to the post API so somebody could bulk load a bunch of existing content via the API without invoking the notifier and sending each out as a fresh post. 2014-10-05 01:09:57 -07:00
friendica
87a6f25769 try to sort out walltowall translation for diaspora recipients 2014-09-19 02:22:24 -07:00
friendica
c6d07feff5 This is long overdue - use a symblic constant NULL_DATE instead of the easily mis-typed sequence '0000-00-00 00:00:00' 2014-09-08 20:35:15 -07:00
friendica
7001f41d3d provide a config option to prevent wall uploads (photos and files) from being set to the same ACL as the containing post, and instead are uploaded with public visibility (no ACL). This is to prevent folks on other networks from seeing prohibited signs for things uploaded into a private conversation. It is primarily useful when posting to collections that have mixed folks from red and other networks and an otherwise public (typical) profile. Consequently, these uploads will match your chosen default visibility for photos and storage and not that of the containing conversation item (and is only useful if the default visibility is public). This choice must be explained adequately because it represents a complex series of tradeoffs and side effects. It will reduce complaints from other networks about blocked content, but essentially forces you to use another method (dav or the photos page) if you wish to upload protected files/media. 2014-09-02 21:11:09 -07:00
friendica
88f8900ac5 various diaspora issues 2014-08-29 17:31:40 -07:00