Commit Graph

5020 Commits

Author SHA1 Message Date
Alexei Sorokin
7b1c3dbb3f [Nodeinfo] Count active users for full days and without silenced 2021-07-16 19:44:36 +01:00
Diogo Cordeiro
4caa394db6 [UI] Small improvement on attachment's visual 2021-07-16 19:44:36 +01:00
Diogo Cordeiro
617e3af5cd [SensitiveContent] Fix plugin settings
Also reformatted the code and minor bug fixed it
2021-07-16 19:44:36 +01:00
nee
7ee8751b8e [SensitiveContent] Add option to activate for not-logged-in visitors
Remove redundant setting retrival code.

An example config.php entry to activate the new config:
$config['site']['sensitivecontent']['hideforvisitors'] = true;
2021-07-16 19:44:36 +01:00
nee
2419d85edf [SensitiveContent] Don't crash in GNU social classic
When an attachment has no thumbnail (for example when it's a video).
2021-07-16 19:44:36 +01:00
Diogo Cordeiro
1ea12e0cdf [PLUGINS] Remove VideoThumbnails not useful anymore 2021-07-16 19:44:36 +01:00
Diogo Cordeiro
6598b89db0 [ActivityPub] Fix profile url handling 2021-07-16 19:44:36 +01:00
Diogo Cordeiro
4a90f281ed [ActivityPub] Fix undefined tag index 'type' in Activitypub_notice 2021-07-16 19:44:36 +01:00
Alexei Sorokin
3951ccbef7 [CORE] Use monotonic time via hrtime() where applicable
The realtime clock is not reliable when calculating elapsed time.
2021-07-16 19:44:36 +01:00
Diogo Cordeiro
91869c78ac [CORE] Better queues defaults 2021-07-16 19:44:36 +01:00
Diogo Cordeiro
351e356bb4 [ActivityPub][Postman] Fix not sending notices to self 2021-07-16 19:44:36 +01:00
Diogo Cordeiro
705b679332 [Ostatus] Partially revert 69add504e6
updateuris isn't needed after alll, we should solve this with TFNM and existing infrastructure.
2021-07-16 19:44:36 +01:00
Diogo Cordeiro
e7778bd5d7 [ActivityPub][RSA] Revision, increase type scrictness and improve docs 2021-07-16 19:44:36 +01:00
Diogo Cordeiro
73af7be061 [ActivityPub] Properly handle Actor URIs by using events correctly
This should fix nulls on explorer lookups inputed by postman after generate_followers/getSubscribers, that I think were caused by calling common_profile_uri that, curiously, only handles local profiles
2021-07-16 19:44:36 +01:00
Diogo Cordeiro
165edc2609 [CORE] Add GNUSOCIAL_ENGINE_REPO_URL and increase usage of GNUSOCIAL_ENGINE_URL 2021-07-16 19:44:36 +01:00
Alexei Sorokin
ef056779fc [Xmpp] Adjust type declarations for changes in XMPPHP 2021-07-16 19:44:36 +01:00
Diogo Cordeiro
c96dafa191 [ActivityPub][RSA] Fix types of generate_keys 2021-07-16 19:44:36 +01:00
Diogo Cordeiro
3d805026a2 [ExtendedProfile] Fix updates and allow to delete values 2021-07-16 19:44:36 +01:00
Diogo Cordeiro
3b01aa31d3 [REALTIME] Reviewed both the superclass and its dist plugins 2021-07-16 19:44:36 +01:00
Alexei Sorokin
0bbcb5b098 [Xmpp] Latin-1 space characters are not forbidden for XMPP resources
Also use mb_strlen() with the 8bit encoding to count octets, strlen() is not as
reliable (mbstring.func_overload).
2021-07-16 19:44:35 +01:00
Alexei Sorokin
05f4b1e97d [Xmpp] Use UnexpectedValueException in splitJid, a bit narrower 2021-07-16 19:44:35 +01:00
Alexei Sorokin
eab5725698 [DATABASE] Disable 'NULL' strings evaluation as SQL NULLs
Use $object->sqlValue('NULL') (identical to DataObject_Cast'ing) instead and
fix related issues like (email|sms)settings considering these NULLs as a
false positive for the E-Mail address still being set when it's been removed.

There could also be security implications to the now-disabled approach of
considering 'NULL' strings as SQL NULLs.
2021-07-16 19:44:35 +01:00
Diogo Cordeiro
fd68965255 [ActivityPub] New URI system 2021-07-16 19:44:35 +01:00
tenma
b19da881c7 [TheFreeNetwork] First code: Module class and census event 2021-07-16 19:44:35 +01:00
tenma
3fb78ab108 [OStatus] Add script for profile deduplication and URI fixing 2021-07-16 19:44:35 +01:00
tenma
6a37c21ead [ActivityPub] Fix some small known problems
ActivityPubPlugin:
- Rework onProfileDeleteRelated to account for the tables _rsa and _pending_follow_requests
- Update onEndShowAccountProfileBlock to stop creating the ap_profile if it doesn't exist (we'll handle this in a different manner)

Activitypub_profile:
- Remove unnecessary code from from_profile method and add return type information

Explorer:
- Update travel_collection to call itself instead of _lookup, that was wrong
2021-07-16 19:44:35 +01:00
Alexei Sorokin
b3c2dfd9c9 [AnonymousFave][DATABASE] Set the created timestamp on INSERT 2021-07-16 19:44:35 +01:00
Alexei Sorokin
0c1e9bbc17 [DAEMONS][TwitterBridge] Set PUBLICDIR 2021-07-16 19:44:35 +01:00
Alexei Sorokin
ab020c7528 [COMPOSER] Remove some pre-composer remnants from the code 2021-07-16 19:44:35 +01:00
tenma
234ba7705f [ActivityPub] Fix successive "Cannot use object of type stdClass as array" errors in the postman 2021-07-16 19:44:35 +01:00
tenma
4901126519 [ActivityPub] Revert usage of bitwise-operator & in the inbox_handler class. 2021-07-16 19:44:35 +01:00
Diogo Cordeiro
9088e58a64 [ActivityPub] The protocol allows content to be null, GNU social doesn't, we'll reject silentiously
Reported by kaniini
2021-07-16 19:44:35 +01:00
Diogo Cordeiro
4133874e59 [ActivityPub] attributedTo itself is not required, if not present then it should be inferred from the actor
Reported by kaniini
2021-07-16 19:44:35 +01:00
Diogo Cordeiro
b7ce5b91a4 [ActivityPub] Fix security issue concerning remote profile deletes
Reported by kaniini
2021-07-16 19:44:35 +01:00
Diogo Cordeiro
48eee0e018 [ActivityPub] Inbox Handler: Remove old guzzle import
Improve exception information in doc blocks
2021-07-16 19:44:35 +01:00
Diogo Cordeiro
174733edc8 [ActivityPub] Slightly increase robustness on exception handling
Also ported Activitypub_rsa to PHP7
Minor indentation fixes
2021-07-16 19:44:35 +01:00
Diogo Cordeiro
c93049d0da [ActivityPub] Consistent headers in explorer requests
Minor indentation fixes
2021-07-16 19:44:35 +01:00
Miguel Dantas
9692150c23 Fix 'Call to a member function getPayload() on null'
Trying to enable the RedisCache with the latest nightly, getting this with the daemon:

sep 25 11:40:18 friedrich startdaemons.sh[21428]: PHP Fatal error:  Uncaught Error: Call to a member function getPayload() on null in /var/www/social/plugins/RedisCache/RedisCachePlugin.php:96
sep 25 11:40:18 friedrich startdaemons.sh[21428]: Stack trace:
sep 25 11:40:18 friedrich startdaemons.sh[21428]: #0 /var/www/social/lib/util/event.php(89): RedisCachePlugin->onStartCacheSet('gnusocial:herds...', Object(HubSub), NULL, 86400, false)
sep 25 11:40:18 friedrich startdaemons.sh[21428]: #1 /var/www/social/lib/cache/cache.php(202): Event::handle('StartCacheSet', Array)
sep 25 11:40:18 friedrich startdaemons.sh[21428]: #2 /var/www/social/classes/Memcached_DataObject.php(520): Cache->set('gnusocial:herds...', Object(HubSub))
sep 25 11:40:18 friedrich startdaemons.sh[21428]: #3 /var/www/social/classes/Memcached_DataObject.php(52): Memcached_DataObject->encache()
sep 25 11:40:18 friedrich startdaemons.sh[21428]: #4 /var/www/social/classes/Managed_DataObject.php(50): Memcached_DataObject::getClassKV('HubSub', 'hashkey', 'a38b9dc516371af...')
sep 25 11:40:18 friedrich startdaemons.sh[21428]: #5 /var/www/social/plugins/OStatus/classes/HubSub.php(47): Managed_DataObject::getKV('hashkey', 'a38b9dc516371af...')
sep 25 11:40:18 friedrich startdaemons.sh[21428]: #6 /var/www/social/plugins/OStatus/lib/hubprepqueuehandler.php(68): HubSub::getByHashkey('https://herds.e...', 'https://raki.so...')
sep 25 11:40:18 friedrich startdaemons.sh[21428]: #7 /var/www/social/plugins/RedisQueue/classes/RedisQueueManager.php(58): HubPrepQueueHandl in /var/www/social/plugins/RedisCache/RedisCachePlugin.php on line 96
Sign in to j
2021-07-16 19:44:35 +01:00
Alexei Sorokin
0fac7e49e2 Fix minor git merge resolving issues 2021-07-16 19:44:35 +01:00
Alexei Sorokin
1ba3416cd1 [SCRIPTS] Set PUBLICDIR in plugin scripts as well 2021-07-16 19:44:35 +01:00
Diogo Cordeiro
344db5dcdf [ActivityPub] Add missing parenthesis in class instantiation
Fixed some issues related to thrown exceptions in the doblocks; also boolean -> bool
2021-07-16 19:44:35 +01:00
Alexei Sorokin
5f87c14bf8 [ActivityPub] Fix an unhandled error in onStartGetProfileFromURI 2021-07-16 19:44:35 +01:00
Diogo Cordeiro
d0e3f9c823 [ActivityPub] Fix some bugs with onStartNoticeSearch
Refactored Activitypub_profile::ensure_web_finger to Activitypub_profile::ensure_webfinger
Do not throw exceptions in the handling of this event because we don't
want to stop the regular search just because we were unable to find
ActivityPub actors or notes.
2021-07-16 19:44:35 +01:00
Diogo Cordeiro
acd64ba54a [BugFix] Plugins ExtendedProfile and OverwriteThemeBackground - admin is identical to system path names. 2021-07-16 19:44:35 +01:00
Alexei Sorokin
8e9db78258 [OStatus] The unsubscribe state also needs a label 2021-07-16 19:44:35 +01:00
Diogo Cordeiro
ee405df000 [MODULES] Make disable in admin panel effective 2021-07-16 19:44:35 +01:00
Alexei Sorokin
16b5ddd230 [DATABASE] Re-introduce PostgreSQL support 2021-07-16 19:44:35 +01:00
Alexei Sorokin
37e5983aca [DATABASE] Columns not in GROUP BY must not be queried 2021-07-16 19:44:35 +01:00
Alexei Sorokin
0e0c375e65 [DATABASE] Re-introduce the enum type abstraction 2021-07-16 19:44:35 +01:00
Alexei Sorokin
6b4344968d [DATABASE] Set all primary keys as "not null" explicitly 2021-07-16 19:44:35 +01:00