Commit Graph

18466 Commits

Author SHA1 Message Date
Alexei Sorokin
07b0aa8f52 [DATABASE] Fix remaining misuses of SQL's GROUP BY 2020-08-10 19:29:04 +03:00
Alexei Sorokin
ce665baa88 [Queue_item] There is no "modified" attribute
Fixes a regression introduced in ec86de2bc4
2020-08-10 17:46:30 +03:00
Alexei Sorokin
8c41663175 Revert "[CORE] Avoid the old "reply" relation in inboxnoticestream"
It is needed for mentions.
2020-08-10 17:23:57 +03:00
Alexei Sorokin
7cb10b71bb [RequireValidatedEmail] Only check current user posts
This check made registration impossible when welcomeuser didn't have validation
as well.

And rename the "grandfatherCutoff" option to "exemptBefore".
"Grandfathering" is a relatively obscure term linked to the history of the
United States of America, so replace that with something self-descriptive.
2020-08-09 23:58:25 +03:00
Alexei Sorokin
47cacf5f1a [NOTICES] Restore FullNoticeStream
But only allow a select number of verbs.
This is to display optional subscription notices.
2020-08-09 21:00:14 +03:00
Alexei Sorokin
042e4b070c [EmailAuthentication] Check if e-mail with filter_var 2020-08-09 20:35:31 +03:00
Alexei Sorokin
f84dbb369f [DATABASE] Enable fulltext search by default
Also rename fulltext indices to more fitting names
and move the check from classes into database/schema.php
2020-08-08 18:08:06 +03:00
Alexei Sorokin
34ec165bff [DATABASE][PostgreSQL] Add fulltext search support 2020-08-08 16:56:20 +03:00
Alexei Sorokin
b20c0bdec7 Clean Notice_prefs and Fave_tally when a notice is deleted 2020-08-08 12:22:35 +03:00
t3nma
c527ad0803 [COMPOSER] Add new php-ffmpeg package 2020-08-07 23:42:38 +01:00
Alexei Sorokin
0a6bb5190f [ExtendedProfile] Clean up of missing array indices handling 2020-08-07 11:59:17 +03:00
Alexei Sorokin
cf353f8829 [TwitterBridge] Do not fail on missing notice 2020-08-07 11:42:21 +03:00
Alexei Sorokin
2bd7c021fd [ACTIONS] Fix selftag 2020-08-07 10:20:03 +03:00
Alexei Sorokin
46f788d1eb [UTIL] Fix up common_ensure_session()
Give priority to cookies over GET.

Make sure session ids have only expected characters
(PHP file session handler's limitation).

Replace a mostly useless log warning with a debug message.
2020-08-06 21:54:49 +03:00
Alexei Sorokin
5ea5d30075 [EXCEPTIONS] Inherit the Previous Exception parameter 2020-08-06 20:03:44 +03:00
t3nma
22d650469b [TwitterBridge] Fix issue "Only variables should be assigned by reference"
From the docs: "The new operator returns a reference automatically, so
assigning the result of new by reference is not allowed as of PHP 7.0.0"
2020-08-06 17:25:27 +01:00
Diogo Cordeiro
849ad494d8 [ActivityPub][NOTICE] Process attachments 2020-08-05 18:23:41 +01:00
Diogo Cordeiro
7a2bb38331 [MEDIA] fromUrl now supports using original file name 2020-08-05 17:53:31 +01:00
Diogo Cordeiro
1428ac2cb0 [ActivityPub][NOTICE] Fix variable being wrongly reused 2020-08-05 17:53:31 +01:00
Diogo Cordeiro
efdc7d9ba0 [ActivityPub][INBOX][Delete] Support Delete Actor object being a Tombstone 2020-08-05 17:53:31 +01:00
Diogo Cordeiro
e4e41bb595 [ActivityPub][NOTICE] Fix other federation protocols mention handling 2020-08-04 20:00:55 +01:00
Diogo Cordeiro
379fbb6e5d [ActivityPub][SCRIPTS] Add fix_subscriptions.php 2020-08-04 17:12:01 +01:00
Diogo Cordeiro
09c3236afc [TheFreeNetwork][fix_duplicates.php] Don't die because you couldn't federate an undo follow 2020-08-04 13:03:33 +01:00
Diogo Cordeiro
7d52440461 [TheFreeNetwork][fix_duplicates.php] Small improvements on queries performed 2020-08-04 12:38:51 +01:00
Alexei Sorokin
e206995268 Set HTTP status codes with http_​response_​code() 2020-08-04 14:12:17 +03:00
Alexei Sorokin
ab4120721f [Favorite] Fix "Properly trigger DisfavorNotice on profile deletion"
Calling find() inside delete() is probably not a good idea.
2020-08-04 13:23:31 +03:00
Diogo Cordeiro
a9c365a5eb [VersionBump] 2.0.0alpha0
Ran composer update and locale updater
2020-08-04 05:31:44 +01:00
Diogo Cordeiro
8ad928d48d [TheFreeNetwork] Add Readme
Improve script fix_duplicates.php's comments
2020-08-04 05:10:11 +01:00
t3nma
ebf5efe9f2 [TheFreeNetwork] Add fix_duplicates script 2020-08-04 05:02:06 +01:00
t3nma
c7055341f9 [TheFreeNetwork] Small rewrite to the onStartTFNLookup event 2020-08-04 02:45:32 +01:00
Diogo Cordeiro
34c5be5c42 [MODULES] Make default loading attributes available in global config 2020-08-04 01:36:21 +01:00
t3nma
1675916fda [ActivityPub][QUEUES] Handle Create (AS1 POST) verb properly
Fixes a bug introduced in e504d13120
2020-08-03 18:21:47 +01:00
Alexei Sorokin
a38c608420 [SCHEMA] Better DBMS information fetching
On PostgreSQL:
  - Parse defaults for strings and booleans properly.
  - Parse the "serial" definition type properly.
  - Get information on the "enum" definition type.
  - Re-work getting information about keys/indices.

On MariaDB:
  - Get information about lengths in indices.
  - Get foreign key information separately from the rest as they can have
    colliding names.
2020-08-01 19:05:48 +03:00
Alexei Sorokin
20be1d179a [OpenID][DATABASE] Store UNIX timestamps as BIGINT 2020-07-31 18:40:53 +03:00
Alexei Sorokin
1870f38099 [SCHEMA] Fix a few mistakes 2020-07-31 18:24:12 +03:00
Alexei Sorokin
96eced9845 [BLOCK] Increase type strictness 2020-07-31 16:35:27 +03:00
Alexei Sorokin
92e8c40c55 [DATABASE] Add explicit indices for all foreign keys
This adds a requirement for all definitions that have foreign keys to also
require indices for all source (local) attributes mentioned in foreign keys.

MariaDB/MySQL creates indices for source attributes automatically, so this
serves as a way to get rid of those automatic indices and create clean explicit
ones instead.

In PostgreSQL, most of the time, indices on the source are necessary to
decrease performance penalty of foreign keys (like in MariaDB), but they aren't
created automatically, so this serves to remove that difference between
PostgreSQL and MariaDB.
2020-07-31 16:36:40 +03:00
Alexei Sorokin
0bfa747382 [DATABASE] Fix index identifiers and clean up redundant ones 2020-07-31 16:12:48 +03:00
t3nma
be3c4263b3 [DirectMessage] Update ApiDirectMessageNew action
- Messages are now saved as Notices
2020-07-29 17:50:29 +01:00
t3nma
f00852a619 [DirectMessage] Update ApiDirectMessage action
- getMessages() is now fetching from the Notice table as supposed
- every show{format}* method is properly updated to use Notice objects
- json and xml responses retrieve multi-recipients without compromising
  backwards compatibility
2020-07-28 05:49:37 +01:00
t3nma
83df8848c8 [DirectMessage] Update inboxMessages() to stop fetching replies
This is yet to be supported in the plugin.
2020-07-28 05:48:43 +01:00
t3nma
99183ce4e2 [DirectMessage] PSR12-format 2020-07-28 04:46:10 +01:00
Alexei Sorokin
434ce56e33 [DOCUMENTATION] Adopt PSR-12 and clarify on arrays 2020-07-27 19:19:42 +03:00
Alexei Sorokin
ec86de2bc4 [DATABASE] Update "modified" in Managed_DataObject instead of a DBMS trigger
Instead of relying on the MariaDB's ON UPDATE CURRENT_TIMESTAMP trigger update
"modified" attributes in Managed_DataObject. Every raw query that needs
adjusting is adjusted, as they won't update "modified" automatically anymore.

The main goal behind this change is to fix "modified" updates on PostgreSQL.
2020-07-27 19:10:33 +03:00
Alexei Sorokin
341f3d0ea5 [DATABASE] Fix more incorrect uses of quotation in SQL 2020-07-26 15:28:05 +03:00
Alexei Sorokin
579120df70 [Notice] Fix clearReplies() and clearRepeats() 2020-07-26 15:12:00 +03:00
Alexei Sorokin
63eb323e8b [SHOWSTREAM] Add "noindex" robots meta-tag for silenced profiles 2020-07-26 13:59:37 +03:00
Alexei Sorokin
2861ae2823 [AuthCrypt] Password storage and comparison improvements
Password hashes are now stored in a TEXT attribute, not limited to 199 symbols.
That limitation makes no sense as password hashes are not the kind of
information to be indexed.

Actually replace crypt() with password_verify() for password checking, current
code left password_verify() unused.

Only update passwords when they use a different algorithm from the current
default. Previously "overwrite" meant rehashing every login.

Replace the "argon" boolean option with "algorithm" and "algorithm_options" for
better configurability.
The default remains whichever is default for PHP's password_hash.
2020-07-25 20:16:21 +03:00
Diogo Cordeiro
0b947ce2c7 [AuthCrypt] Update README and fix formatting 2020-07-25 17:42:46 +01:00
Diogo Cordeiro
2222d6d173 [MODULES] Make settings great again
Plugin main class doesn't use this construct despite extending this class.
2020-07-25 17:47:53 +01:00