Commit graph

105 commits

Author SHA1 Message Date
redmatrix
77a03e376c Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	include/photo/photo_driver.php
	include/text.php
	mod/post.php
2015-11-03 20:46:47 -08:00
redmatrix
5dade2b608 backport small bits of the re-install fix; at least the damaging bits 2015-11-03 20:40:43 -08:00
redmatrix
877b3361c8 better re-install detection/protection. This necessitated a slight protocol change but should not introduce any compatibility issues with older software. Things just work better if you use an up-to-date server. 2015-11-03 20:28:56 -08:00
redmatrix
2fbfc2a8f1 need better peer verification due to re-install issue, this is temporary 2015-11-03 19:50:40 -08:00
redmatrix
326ae5ff6b Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	mod/post.php
2015-09-21 20:29:18 -07:00
redmatrix
8c16f12d7a issue #52 - try all matching hublocs for remote auth, not just the "best one". 2015-09-21 20:20:16 -07:00
redmatrix
859a2ac8ef DB changes for some channel flags 2015-06-15 17:28:52 -07:00
redmatrix
03357481f7 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	install/schema_mysql.sql
	mod/home.php
	mod/page.php
	view/nl/messages.po
	view/nl/strings.php
2015-06-09 16:52:00 -07:00
redmatrix
5b482c1daf magic auth issues on dreamhost 2015-06-07 23:04:46 -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
6f78d7a85d fix regdir 2015-03-31 21:06:48 -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
3466547784 missing include 2015-03-10 02:27:10 -07:00
friendica
98dffd77ef channel delegation 2015-03-10 02:23:14 -07:00
friendica
0249fbb7e6 lost ability to delete events 2015-02-15 16:04:59 -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
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
51848c6190 working through the xchan table to remove bitfields, mostly complete except for updating the updater 2015-01-20 19:33:19 -08:00
friendica
6f11f20992 first cut at unpacking bitfields in hubloc, fixed hubloc_error and hubloc_deleted 2015-01-20 15:35:42 -08:00
friendica
ddc8557b69 hide online presence maps to DNT 2014-11-24 15:36:11 -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
50c16c394f check that we have valid data 2014-11-01 01:52:27 -07: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
0350b76d85 some backend work for the remaining missing bits of mod_hubman - this is still a fair ways from being complete and is not ready for prime time. Basically we'll let a channel send out a public message saying "these are my currently approved locations" and anything that isn't in the list will be marked deleted. We'll send out this message when locations change somehow - either through direct personal involvement (hub revoke, change primary, channel import) or during a system rename or "find bad/obsolete hublocs" activity. This way we won't have clones sending back location info we just got rid of and re-importing the bad entries. 2014-09-13 16:00:09 -07:00
friendica
1accf82bd1 clean up more code duplication 2014-07-14 21:21:24 -07:00
friendica
06b7aea1a0 visage tracking opt-in/opt-out 2014-07-03 17:26:42 -07:00
friendica
1e86a88f0d session DNT - if you want it use it. 2014-07-03 02:20:40 -07:00
friendica
2a6d7b6a07 cleanup dead directory entries. This was a real b#tch, so keep your eye out for issues - which you shouldn't see until next weekend when this is scheduled to run. We're only setting flags, so if anything goes wrong we should be able to recover without too much pain. 2014-05-28 21:42:46 -07:00
friendica
abf0dd5ecf log pickups 2014-05-05 20:15:01 -07:00
friendica
bf1f18e172 Include the entire original item when notifying other channels of deletions as it contains important routing and scope information. Previously we were only sending a couple of critical fields like the message-id, flags, and creation date. The thinking was that it is deleted, let's not resend the deleted contents anywhere. But in order to route this through the same path the original post took we really need the entire original post with all of its baggage attached. 2014-04-10 16:14:19 -07:00
Thomas Willingham
5a8be68900 json_return_and_dir isn't a thing 2014-03-13 02:09:45 +00:00
friendica
74b8a38645 json_return_and_dir is a typo 2014-03-12 19:04:20 -07:00
friendica
39f18d0f16 fix third-party zid's 2014-03-04 15:25:04 -08:00
friendica
eadf5121d0 rev update and a minor fix (missing param) to force_refresh 2014-02-14 12:39:15 -08:00
friendica
d02529fde1 implement a forced directory update mode where we unconditionally create a directory sync packet. This is needed to ensure that monthly directory pings are propagated to other directory servers so they can each prove for themselves whether or not an account is alive or dead. We do not trust other directories to provide us information beyond "look at this entry and decide for yourself" as doing otherwise would invite rogue directory manipulations. As this scheduled update occurs on all channels across all servers, we should also pick up refresh messages from all existing channel clones and these should also propagate out to all directory servers using the same mechanism (though perhaps not at the same time). 2014-02-11 14:19:20 -08:00
Michael Meer
c0f02d774a started analysis of ping response and clean up more logger 2014-01-30 20:41:40 +01:00
Michael Meer
aa285b83c1 to make visible what I try, ping still won't work, but I'm confused about get_channel 2014-01-28 10:58:31 +01:00
Michael Meer
904db593df add a temporary logger command at remote server side 2014-01-27 12:01:53 +01:00
friendica
63a42480c7 add account_level, is_foreigner and is_member functions; convert all e2ee user input and prompts to hex to avoid javascipt's lame handling of quotes. !!This breaks all prior encrypted posts.!! 2013-12-23 15:13:09 -08:00
friendica
44ead61339 authtest: do a better job of success/failure indication 2013-12-17 16:35:22 -08:00
friendica
539988b62f couple of additional checks 2013-12-05 15:55:14 -08:00
friendica
d66d8ff524 mod_authtest --- magic-auth diagnostic for those that are too freaking important to read logs or code and expect others to be able to debug complex authentication transactions with no information beyond "it didn't work". This will provide a transaction report including both sides of the exchange that you can paste into a bug report and that a developer can actually figure out where in the transaction that things went wrong and maybe even be able to then figure out why. 2013-12-05 15:40:50 -08:00
friendica
cc1e906825 generate a small amount of entropy to avoid duplicate notifications from essentially simultaneous deliveries. 2013-12-04 23:54:46 -08:00
friendica
d8903f09f5 include re-organisation and more doco, post_to_red fix ampersands in categories 2013-12-04 00:19:29 -08:00
friendica
f57909d190 on successful magic-auth, put remote_service_class and remote_hub into the session 2013-12-03 16:31:05 -08:00
friendica
645e897852 more work on magic-auth 2013-12-02 19:06:54 -08:00
friendica
e0f4a76856 magic-auth re-factor 2013-12-02 17:35:44 -08:00
friendica
d9f67876dc refactor magic-auth 2013-12-02 15:15:02 -08:00
friendica
194c1e7abc file corruption 2013-12-01 19:29:11 -08:00