Commit Graph

967 Commits

Author SHA1 Message Date
30f4131f5d
[TESTS] Add missing 'is_local' to actors in data fixtures 2021-11-24 12:46:31 +00:00
206856e1ba
[FORM][FormFields] Add way of specifying attributes for password fields (namely form autocomplete=new-password) 2021-11-24 12:46:31 +00:00
3a5e52ee0d
[CORE][SECURITY] Move to the new authentication format, for Symfony 5.3
Keep using (deprecated) Guard
2021-11-24 12:46:26 +00:00
b4ce77320e
[TESTS] Fix remaining tests, back to 100% passed. Some minor semantic changes 2021-11-20 21:33:25 +00:00
c68d7ae406
[CONTROLLER][UserPanel] Make function names camelCase 2021-11-20 21:33:25 +00:00
7e4a971fac
[ENTITY][LocalUser][CACHE] Remove bad keys from getByNickname cache key 2021-11-20 21:33:25 +00:00
0e104a9701
[UTIL][HTML][TESTS] Fix test and implementation and expand HTML generation utilities 2021-11-20 21:33:25 +00:00
fe755f7c42
[UTIL][FormFields] Accomodate use of FormFields::repeated_password without a 'required' option 2021-11-20 21:33:23 +00:00
0aa43783e8
[PLUGIN][Repeat] Repeat now repeats attachments as it should.
[COMPONENTS][Posting] Now accepts attachments already processed.
[ENTITY][Note] Added getAttachmentsWithTitle().
2021-11-17 17:14:15 +00:00
8077bdb0b5
[CORE][Controller] CSP default-src changed to 'self' to allow internal redirects. 2021-11-17 01:29:36 +00:00
1d31bd651e
[CORE][Controller] Added Content-Security-Policy response header. 2021-11-17 00:49:23 +00:00
f07dce4604
[UTIL][Form] Fix bug with repeated_password 2021-11-16 23:27:29 +00:00
89d36a68e5
[ENTITY][Actor] Add is_local, it's common to depend, and this makes it much faster, with a low space cost 2021-11-16 23:26:20 +00:00
b8b19abed2
[ENTITY][AttachmentThumbnail] Do not attempt to check if a file exists if the path is null 2021-11-15 19:25:52 +00:00
5cafc80d01
[UTIL][FormFields] Refactor duplicated language choice form entry logic 2021-11-15 19:25:52 +00:00
e6c0db9ee1
[CORE][Cache] Allow retrieving multiple keys from a hashmap 2021-11-15 19:25:52 +00:00
587d701d11
[CONTROLLER][Network] Temporarily remove replies from streams, following planned changes to the Reply plugin 2021-11-15 19:25:52 +00:00
774eb49af4
[UI][CONTROLLER][UserPanel][ENTITY][ActorLanguage][Language][Actor] Add interface to allow user to select thier preferred languages and to order them. Rename ActorLanguage::order to ordering 2021-11-15 19:25:52 +00:00
d5e6fd603d
[CONTROLLER][UserPanel] Fix 'could not convert IntergetType to string' error 2021-11-15 19:25:51 +00:00
1abd28c949
[UI][TWIG][CONTROLLER][UserPanell] Add way to expand details with a GET parameter. Implement it in UserPanel 2021-11-15 19:25:51 +00:00
c509692102
[ENTITY][AttachmentThumbnail] Uncache when deleting, cleanup code and ensure the biggest thumbnail is used when the original is not avaliable 2021-11-15 19:25:51 +00:00
a3074662b8
[TESTS] Remove 'reply_to' in note creation in data fixtures 2021-11-15 19:25:51 +00:00
eab6de3609
[TESTS][Security] Fix SecurityTest. Remove nickname normalization on register (a plugin can handle that). Move from filter_var(FILTER_VALIDATE_EMAIL) as it does not support dotless domains 2021-11-15 19:25:50 +00:00
bf5ffe7d3d
[CACHE][TEST] Fix errors in cache implementation found by tests 2021-11-15 19:25:44 +00:00
98352cfece
[TESTS] Properly provide both createClient and bootKernel in test base class 2021-11-11 12:39:36 +00:00
2239845a00
[CONTROLLER][Security] Remove nickname normalization when trying to login 2021-11-11 12:39:36 +00:00
a1c78696f7
[CORE][Actor][Posting] Fixup Actor::getPreferredLanguageChoices following changes in how the data is cached 2021-11-11 12:39:36 +00:00
f39f800a8e
[TESTS] Add now-required content-type to notes created in data fixtures 2021-11-11 12:39:35 +00:00
f667b558f7
[TESTS] Fix SecurityTest
This test was broken by changes in the routing and in the templates.
However, this revealead a potential open redirect and duplicated code
in the Reply and Favourite plugins
2021-11-11 12:39:28 +00:00
dea9aa4dcf
[CORE][Router] Remove duplicate service for URL generation, as that is actually the same object 2021-11-11 12:38:09 +00:00
d0f9fde7c2
[PLUGIN][Reply] WIP. Note complementary info now shows who has replied on the original note! 2021-11-10 15:44:28 +00:00
f2f1bdc145
[PLUGIN][Reply] Separated replies from Note table.
[PLUGIN][Repeat] Deleted unnecessary card note template, info now to
appended at the end of note.
[PLUGIN][TreeNotes] WIP to accomodate reply plugin changes.
[TWIG][Runtime] Removed getAdditionalTemplateVars event.
2021-11-10 13:29:53 +00:00
7d8819a3da
[DB][CONTROLLER][Network][ENTITY][Note] Fix Note::getAllNotes 2021-11-09 23:38:37 +00:00
f0c532340e
[DB] Fix uses of DB::sql, to remove the deprecated second entities parameter 2021-11-08 20:35:38 +00:00
767b2035e7
[ENTITY][ActorLanguage] Remove duplicate specification of 'not null' in table schema 2021-11-08 20:32:10 +00:00
1d84f1629e
[CORE][DB] Make DB::sql not error when selecting from tables with columns of the same name and remove the second enitites paramter, calculating it internally instead 2021-11-08 20:32:10 +00:00
f98afd15ce
[ENTITY] Refactor Follow as Subscription 2021-11-08 16:14:23 +00:00
68c6dd1ba9
[CORE][Cache] Use hashmaps to store language related items 2021-11-08 16:08:04 +00:00
2eb31952bc
[ENTITY][Language] Use varchar as char leads to a padded string, which isn't helpful 2021-11-08 16:08:03 +00:00
2cf3a0b4e6
[COMPONENT][Posting] Display short language signifier rather than the full name for the first preffered language 2021-11-08 16:08:03 +00:00
705bf815ab
[CACHE] Add partial implmentation for caching hashmaps (non-list arrays, i.e. array<string,string>). No non-redis-fallback yet 2021-11-08 16:08:03 +00:00
cd470cbf93
[CORE] Fix loading of settings from modules 2021-11-08 16:08:03 +00:00
019ad794d1
[Posting] Add dropdown with language choice, with preferred choice according to user choice and context (group, etc) 2021-11-08 16:08:02 +00:00
9444c34071
[ENTITY][Actor][ActorLanguage][Language] Remove Actor::preferred_lang_id. Add ActorLanguage::order. Add Language::{short_display,long_display}. Instead of an actor having a single preffered language, the entries in ActorLanguage should be used, sorted by ActorLanguage::order 2021-11-08 16:08:02 +00:00
2bd05fbd47
[TOOLS][COMMAND] Add 'app:populate_initial_values' command, which inserts values into the language table if it does not yet contain values. Add database-force-nuke to Makefile, which does all the steps necessary to reset the database 2021-11-08 16:08:02 +00:00
1960f6944f
[CORE][DB] Fix error in regex that prevented selecting collumns that are named the same way a column is 2021-11-02 11:14:59 +00:00
839fa070c7
[CORE][Posting] Default Posting language to site language, if the user hasn't selected one 2021-11-02 11:14:59 +00:00
cf09b48e92
[PLUGINS][Repeat] Added note_repeat entity, fixed visual discrepancies, and completed the expected functionality.
[ENTITY][Note] Removed repeat_off from table. It is now part of the Repeat plugin.
2021-11-01 21:19:56 +00:00
712d1739e4
[UTIL][Formatting] Make local mentions great again 2021-11-01 12:16:29 +00:00
91dd6e1428
[Controller][Security] Fullname is not setup automatically upon registering anymore.
[ENTITY][Actor] Changes to accomodate fullname from potentially being null.
[ENTITY][Note] Changes to accomodate fullname from potentially being null.
2021-10-29 22:05:10 +01:00
9a23e03330
[PLUGINS][Repeat] Repeat template override WIP. 2021-10-29 17:26:20 +01:00
44454ac28a
[UTIL][TemporaryFile] Ensure resource is neither false nor null when attempting to cleanup, otherwise getRealPath returns false and we get sad 2021-10-28 17:36:02 +01:00
458c09485a
[CORE][ENTITY] Move preferred language setting from [LocalUser] to [Actor], make [Language] language unique and make [Note] content_type not null 2021-10-28 17:34:01 +01:00
e6c5312025
[CORE][GSFile] Add check_is_supported_mimetype option to GSFile::storeFileAsAttachment 2021-10-28 17:29:57 +01:00
c352e40518
[CORE][Controller] Allow plugins to override the Twig templates 2021-10-28 14:29:34 +01:00
18aeeb3850
[ENTITY] Add a [Language] table, which has a char 64 field that maps to an int. This is then used in [Note], [LocalUser] and [ActorLanguage] 2021-10-28 11:26:34 +01:00
e54e55dfbf
[EXCEPTION][RedirectException] You are now able to redirect to a specific url. 2021-10-27 20:44:50 +01:00
3e2fefa8af
[TWIG][Cards] Fullname is now displayed as the note author, nickname as an identification.
[CONTROLLER][Security] Fullname is set on resgistration to enable it to be shown by default in notes.
[CONTROLLER][UserPanel] Fullname extra step added.
[CSS] Fullname and nickname representation work.
2021-10-27 20:44:50 +01:00
3cdaf6671a
[CORE][HTTPClient] Add some shortcut functions inspired by pre-v3 2021-10-27 04:22:18 +01:00
3227e1f919
[CORE][Log] Document magic methods 2021-10-27 04:22:18 +01:00
bccafd0d7b
[CORE][GSFile] Respect mimetype whitelist and extensions blacklist before saving files 2021-10-27 04:19:33 +01:00
8038fdbce9
[UTIL][Common] Added Common::getUploadLimit().
[COMPONENT][Posting] Update Posting to warn the user of submtting attachments too large.
2021-10-27 04:19:32 +01:00
656c2c7812
[SECURITY][Authenticator] fix wrong route id on after login redirection 2021-10-27 04:19:32 +01:00
299e893ca9
[TOOLS][PHPStan][DocCheck] Fix errors found by PHPStan and Doc Check 2021-10-27 04:19:31 +01:00
dff5647b97
[DB][Note] Add langauge field to notes 2021-10-27 04:19:31 +01:00
8a10fec31d
[CONTROLLER][UserPanel] Make all fields in settings not required 2021-10-27 04:19:30 +01:00
2694d83ae4
[TOOLS][CS-FIXER] Run new PHP CS Fixer config. Notably, adds strict_types 2021-10-27 04:19:30 +01:00
028ea79fff
[CORE][Router] Properly act on Accept headers 2021-10-27 04:19:30 +01:00
eli
99fd2f725b
[Core][Util] Hotfix: In App\Core\DB\DB persistWithSameId, casting the id to an int. In App\Util\HTML html, tag is now evaluated beforehand, making sure it's a string. 2021-10-27 04:19:30 +01:00
8fdc52636f
[ActivityPub] Port RSA 2021-10-27 04:19:29 +01:00
8544fe157b
[FreeNetwork] First steps porting webfinger/lrdd to v3, GET webfinger requests already have a basic result 2021-10-27 04:19:29 +01:00
44cf1fa24c
[UTIL][Nickname] Fix some parameters issues found with strict types 2021-10-27 04:19:29 +01:00
b524c5bc90
[TOOLS][PHPStan] Add missing toString on the call to DB::filterName, as it seems something changed in some update 2021-10-27 04:19:28 +01:00
b65ee4c21d
[TOOLS][CS-FIXER] Fix incorrect transformation 2021-10-27 04:19:28 +01:00
9109c61af5
[TOOLS][CS-FIXER] Run new PHP CS Fixer config. Notably, adds strict_types 2021-10-27 04:19:28 +01:00
d575f8aef5
[UTIL][Formatting] Make it possible to supply string|array to either or both argument of Formatting::{starts,ends}With 2021-10-27 04:19:26 +01:00
99ab24ec23
[CORE][Controller] Allow routes without text/html response
Improve GET getters
2021-10-27 04:19:23 +01:00
03f6029ce5
[SECURITY] Fix nickname validation and properly allow email auth 2021-10-18 13:22:55 +01:00
071b769997
[CORE][Util][Common] Correct behaviour for absense of value 2021-10-18 13:22:45 +01:00
517ed953f2
[FreeNetwork] First step towards de-duplication mechanism for federation
Refactored AS2 inside AP; [ENTITY][Activity] went from core to AP
Webfinger plugin will be part of FreeNetwork component
2021-10-06 11:48:22 +01:00
eli
3cb6563c40 [TWIG][EndShowStyles] Route as an event argument 2021-10-06 00:34:27 +01:00
eli
17a13b3f20 [CSS] Fix: Left and right panel checkbox border when active. 2021-10-04 12:31:06 +01:00
eli
80d1be323d [COMPONENTS][Search][CSS] Extra header forms now accessible through a details element. Re-organizing templates structure. 2021-10-04 12:17:14 +01:00
eli
d38ad60c76 [COMPONENTS][CSS] Adding components styling properly. 2021-10-01 17:25:51 +01:00
19c2a91232
[TOOLS][PHPStan][ProfileColor][ENTITY][TEST][AttachmentThumbnail] Fix issues reported by phpstan 2021-09-27 19:50:56 +01:00
1107d8257d
[TWIG] Add instanceof test
Use with:
{% if var is instanceof(Namespace\Class) %}
2021-09-27 19:50:56 +01:00
2d8b220e92
[CORE][Controller] Make Controller abstract, handle an optional non static method and use static::class rather than get_called_class 2021-09-27 19:50:56 +01:00
a681acae67
[ENTITY][AttachmentThumbnail] Every image should have width and height attributes 2021-09-25 19:40:11 +01:00
3268559f9a
[AttachmentThumbnail] Use other thumbnail when requested isn't available and there's no original file 2021-09-23 16:19:50 +01:00
af3531f1c7
[CORE][GSFile] Add type annotation to the $encoders used in attachment handling 2021-09-23 14:54:21 +01:00
21e598d877
[ENTITY][Actor] Fix issue with deleting a self tag 2021-09-23 14:34:34 +01:00
4820a863a9
[Avatar] Fix cache usage and other minor bugs 2021-09-23 14:34:34 +01:00
a557ba0224 [Timelines][Plugins][Left] Plugins now provide their path ID. Feed redone as it's own independant template. 2021-09-22 16:47:06 +01:00
05f16a3084
[ENTITY][AttachmentThumbnail] Now thumbnails are always only available in three sizes: small, medium, big
Commit jointly produced with eli (Eliseu Amaro)

Breaking change: Entity changed to only store the tinyint referring to the size stored

With this, the logic was simplified and now it's not possible to make an
instance produce unnecessary thumbs. The aspect ratio is preserved and
thus the thumbs will always look nice. New configuration was added to
maintain flexibility.
2021-09-22 15:13:46 +01:00
7beb5c2995
[GSFile] Fix sanitize configuration 2021-09-22 15:13:46 +01:00
69e7dc44bd
[ENTITY][Note] Change isVisibleTo to allow for not supplying an actor 2021-09-21 16:38:50 +01:00
879f54c772
[CACHE] Filter notes by scope in pagedStream
This currently does not return a fixed number of notes per page. Fixing this is left as an exercise to the reader
2021-09-21 16:37:51 +01:00
14c173df7a
[CACHE][COMPONENT][Tag] Add generic Cache::pagedStream and use it for the tag stream. Note that it doesn't respect scope yet 2021-09-21 15:35:07 +01:00
6715a036e9
[CACHE] Add way to fetch limit,offset values from a list 2021-09-21 11:04:26 +01:00
ce80065775
[DB] Add mechanism for specifying limit and offset in dql query 2021-09-21 11:04:26 +01:00
91fd7d1cfa
[CONFIG][CORE] Fix bug in overriding default config 2021-09-21 11:04:14 +01:00
8bb6285522
[ENTITY][Note] A note may have no content 2021-09-20 17:06:21 +01:00
b7298eaa44
[ENTITY] ActorTag: use getter for tag name on toString 2021-09-20 17:05:50 +01:00
8fe8687c5b
[UTIL][HTML] Move to a unified array 2021-09-20 13:28:18 +01:00
e8f4563633
[UTIL][Formatting][COMPONENT][Link][Tag] Refactor code from formatting into Link and Tag, where appropriate. Drop 'perfect url regex' as the one used in v2 is better 2021-09-20 13:28:18 +01:00
556b8f8265
[ENTITY][NoteTag] Add 'canonical' field to tag 2021-09-20 13:27:27 +01:00
04174bc56d
[UTIL][UI] Change how plaintext notes are rendered to be split into paragraphs. Remove span around tags 2021-09-20 13:27:27 +01:00
51c7e10483
[UTIL][HTML] Allow specifying options: [raw => bool], whether to escape the provided inner HTML or not. Use with care 2021-09-20 13:27:21 +01:00
67d62cf37b
[TWIG] Remove kludge event TwigPopulateVars 2021-09-18 07:27:35 +01:00
fda998e335
[Avatar] We definitely don't need an event to retrieve avatar urls 2021-09-18 07:26:10 +01:00
2bd19fa087
[NOTE][Posting] Revert regressions introduced with c90efe2c52
Entity Note: It doesn't make sense to handle attachments on Note::create.
Attachments exist out of Notes, they are a thing on their own.
Furthermore, they aren't always handled the same, they most definitely
aren't always uploaded files.

FileQuota: It doesn't make sense to check if a file is greater than max
allowed upload size here. The plugin ensures a user is inside his
allowed quota, it's ignorant to anything else. Whether a file respect
max upload is a core thing that must be handled directly in the Posting
component. TODO: The configuration regarding user and monthly quota
must become FileQuotaPlugin settings and be removed from core.

c90efe2c52 - [UI] Add mechanism for rendering note contents in different formats. Implement plaintext rendering. Use rendered field for note content, rather than the content itself
2021-09-18 05:12:18 +01:00
941cbe6599
[Actor] Refactor GSActor into Actor 2021-09-18 05:12:17 +01:00
d6f31d102a
[CORE][ActivityStreamsTwo][ActivityPub] Set all routes
Allow global routes to act for every actor
Fix Favoured stream query
2021-09-18 05:12:15 +01:00
b177cb69e7
[HTML][SECURITY] Harden implmentation of HTML generation 2021-09-18 05:12:08 +01:00
8f0a3e4977
[UI] Add mechanism for rendering note contents in different formats. Implement plaintext rendering. Use rendered field for note content, rather than the content itself 2021-09-18 05:12:06 +01:00
f344ed376c
[ATTACHMENTS][Embed][UI] Allow plugins to provide a title for an attachment, if a note has none, implement such a mechanism in Embed and cache the result, since it is potentially costly 2021-09-18 05:12:06 +01:00
15a2a69274
[ROUTER] Add option is_system_path, to allow specifying that a route, such as gsactor_view_nickname should not be considered a system path, when checking for the collision of nicknames 2021-09-18 05:12:05 +01:00
e563c393f8
[ROUTER] Add mechanism for sorting the order in which core routes are loaded 2021-09-18 05:12:05 +01:00
e9d809d441 [Security][Exception] Security exception handling, login and register. TODO EmailNotFoundException and NicknameNotFoundException. 2021-09-15 14:48:06 +01:00
26af284353 [CONTROLLER][SECURITY] Registration feedback. The flashError works. However, Symfony's Exception error page is viewed upon trying to register. 2021-09-15 14:48:06 +01:00
365edbaff0
[ActivityStreamsTwo] Initial Actor support
Various bug fixes
2021-09-15 10:26:53 +01:00
1adde913c6
[PHPStan] Only run custom PHPStan extensions if environment vairable PHPSTAN_BOOT_KERNEL is defined (since it requires having the whole social setup available) 2021-09-14 13:13:45 +01:00
7c465bba5f
[NOTE] Add mimetype to notes 2021-09-14 13:13:45 +01:00
c69b28d894
[CORE] Fix Undefined array key 0 in DB::filterTableName 2021-09-14 13:13:45 +01:00
b74d944ae3
[TOOLS][PHPStan] Raise PHPStan level to 3 and fix new errors 2021-09-14 13:13:45 +01:00
f81bf4a257
[TOOLS][PHPStan] Add mechanism for initializing the whole application 2021-09-14 13:13:44 +01:00
ddb9702b1c
[TOOLS][PHPStan] Add support for deducing the correct entity type from a table name. Needs refactoring and can only run inside container, as it connects to the database itself 2021-09-14 13:13:44 +01:00
4e30e5aad9
[TOOLS] Fix all issues found by PHPStan level 2 2021-09-14 13:13:44 +01:00
61071a6821
[PLUGINS][Reply][Repeat][Favourite] Base template semantic rework. Reply, repeat and favourite respective classes are now assigned in their NoteHandlerPlugin. 2021-09-14 13:13:43 +01:00
ddd2ffe26a
[TWIG] Add extension to check if Firefox is being used 2021-09-14 13:13:43 +01:00
add8f4a52f
[TOOLS] Fix all errors found by PHPStan level 1 2021-09-14 13:13:42 +01:00
277a080d7c
[EXCEPTION] Add NotImplementedException 2021-09-14 13:13:42 +01:00
eb833b62e2
[TOOLS] Fix all level 0 errors found by PHPStan and move constant definition to bootstrap file 2021-09-14 13:13:42 +01:00
f65e2b90f2
[CORE] Fix use of Exception class without import 2021-09-14 13:13:41 +01:00
cbbef90752
[UTIL][CONFIG] Ensure setConfig uses a locals key 2021-09-14 13:13:41 +01:00
4916c8cbda
[CONTROLLER][AdminPanel] Add missing Exception import 2021-09-14 13:13:41 +01:00
e8ae0b74e0
[CORE][Controller] Switch order for content negotiation: allow events to take precedence. Bring back default JSON response 2021-09-14 13:13:41 +01:00
cd89106fc0
[EXCEPTION][RedirectException] Add prevention for open redirects by default and ensure we can redirect to the same page 2021-09-14 13:13:40 +01:00
16cde6dfd7
[PLUGINS][Reply] Redirect back to previous URL on note reply. Move controller to own class
This should be safe against open redirects, as it doesn't allow redirecting to other domains
2021-09-14 13:13:40 +01:00
0a7fd9c460
[CORE][MODULES][NoteHandlerPlugin] Add missing import for Event 2021-09-14 13:13:40 +01:00
1d5fd1aefa
[CORE][Controller] Fix Controller::__invoke so it actually passes on the route parameters to the controller method. Add Controller->string, which gets a query parameter as a string value, or null if not set 2021-09-14 13:13:40 +01:00
330143e549
[ROUTER][DOCUMENTATION] Add Router::isAbsolute, add documentation to Router::url and `s/setRouter/serServices/ 2021-09-14 13:13:39 +01:00
be27a10244
[EVENTS] Rename event RouteInFormat to ControllerResponseInFormat 2021-09-14 13:13:39 +01:00
983e0303a5
[ROUTER] Sort routes so that the one with a smaller list of Accept types matches first
This requires a copy, but gets cached, so it's the ideal place to do it.

Note that only routes that match the incoming Accept match anyway, so the order between those with different accept types is not relevant
2021-09-14 13:13:39 +01:00
45734d882c
[CONFIG] Make it possible to write module configuration in a config.{php,yml,yaml,xml} file and set each value as properties in the module object 2021-09-14 13:13:38 +01:00
e4aa3ae968
[NOTE] Add route and controller 2021-09-14 13:13:37 +01:00
fd3b57dc24
[CORE][Controller] Make it possible for plugins to add different content-types to existing routes 2021-09-14 13:13:37 +01:00
626f50080b
[MODULES] Use snake_case for module config keys 2021-09-14 13:13:37 +01:00
033c4db914
[MODULES] Add function to defer module initialization and cleanup to plugin and component. Add example in Avatar component
Forward onInitializeModule to onInitializePlugin if the component is a plugin
2021-09-14 13:13:37 +01:00
bda839be7b
[MODULES] Add InitiializeModule and CleanupModule events, similar to v2 2021-09-14 13:13:37 +01:00
1ee8df1494
[DOCS][Developer] Elaborate on implementing and configuring a module 2021-09-14 13:13:37 +01:00
141f919ca7
[CONFIG][TESTS] Fix error found by AdminPanel test 2021-09-14 13:13:36 +01:00
c71a4b06ef
[CONFIG] Make it possible to write module configuration in a config.{php,yml,yaml,xml} file and set each value as properties in the module object 2021-09-14 13:13:36 +01:00
3587b8dc1d
[CONFIG] Refactor configuration loading 2021-09-14 13:13:36 +01:00
2fdd0b0820
[TESTS][DataFixtures] Use Temporary file instead of an ad-hoc solution to copy the upload files 2021-09-14 13:13:36 +01:00
2b457655ea
[CORE] Fix path configuration 2021-09-14 13:13:35 +01:00
e7b985a460
[FIXTURES] Catch any exception, we don't have VIPS-related only 2021-09-14 13:13:35 +01:00
f9079784c4
[ENTITY][AttachmentThumbnail] Improve the way EncoderPlugins participate in the thumbnail process 2021-09-14 13:13:35 +01:00
bc1fb007aa
[Core][GSFile] Improve the way EncoderPlugins participate in the file sanitization process 2021-09-14 13:13:34 +01:00
210f895e74
[ENTITY][Attachment] Respect rfc6838#section-4.2 mimetype length 2021-09-14 13:13:34 +01:00
2a3db65216
[CONTROLLER][Attachment] Some attachments may not have dimensions 2021-09-14 13:13:34 +01:00
26bf78360b
[ROUTER][UTIL] Allow specifying the Accept format for a route 2021-09-14 13:13:34 +01:00
811caaadf9
[MODULES][PLUGINS] Move noteActionHandle utility to NoteHandlerPlugin which plugins which handle actions on notes should extend 2021-09-14 13:13:34 +01:00
458b6d0009
[UI] Rename all forms to more specific names, to avoid form name collisions 2021-09-14 13:13:33 +01:00
6af1383e07
[UTIL][Form] Disallow using very generic form names, as they can collide with other forms in the same page 2021-09-14 13:13:33 +01:00
4cd3924cc1
[ATTACHMENTS][AttachmentThumbnail] Fix implementation of predictScalingValues and small fixes 2021-09-14 13:13:32 +01:00
2ccbbd53a6
[TESTS] Add code coverage annotations to entities 2021-09-14 13:13:32 +01:00
79215bc439
[Note] Fix scope check for group notes, move away from SQL, to DQL 2021-09-14 13:13:32 +01:00
e392a9c90c
[TESTS][DataFixtures] Add user, self follows, group member and group scope note 2021-09-14 13:13:32 +01:00
4b2a92d052
[UI][Attachment] Use Attachment methods to get the proper URL, rather than crafting it in a template 2021-09-14 13:13:32 +01:00
6799052ff5
[ATTACHMENTS] Ensure thumbnail dimensions are bounded and change way cropping is implemented 2021-09-14 13:13:32 +01:00
b50f11a040
[ENTITY][Link] self urls can't be considered a remote url 2021-09-14 13:13:31 +01:00
5c8677304c
[DOCS][Developer] Update storage documentation 2021-09-14 13:13:31 +01:00
e2e6c7a5bf
[TESTS] Hot-fix Security controller tests, broken with ongoing form rendering changes 2021-09-14 13:13:30 +01:00
44a581f0f6
[UTIL][FORM] Password form now shows the proper HTML class, and it's respective label. 2021-09-14 13:13:30 +01:00
87d7318de5
[CONTROLLER][SECURITY] Added class names. Help labels for each form element. Each form element now has a proper block prefix (the resulting HTML won't simply concatenate the form's name to the element's label). 2021-09-14 13:13:30 +01:00
ebee70621b
[FORM] Fix bug where options were passed in the data parameter 2021-09-14 13:13:30 +01:00
4f880eb761
[PLUGINS][ENTITY][Cover][ProfileColor] Clean up after interns and move entity defintions to be inside the corresponding plugin, rather than in core 2021-09-14 13:13:29 +01:00
2351e7c6d1
[CORE][GSFile] Use pathinfo rather than regular expressions and don't attempt to persist an already persisted entity 2021-09-14 13:13:28 +01:00
3843348c1b
[CONTROLLER][Attachment] Small refactor and add testing annotation 2021-09-14 13:13:28 +01:00
e2caf19b67
[TESTS] Remove copied upload test files, if upload failed 2021-09-14 13:13:28 +01:00
aef61e4c73
[TESTS] Add coverage ignore flags to trivial methods 2021-09-14 13:13:28 +01:00
fe86735b8b
[DB][DOCUMENTATION] Explain limit: 2 in findOneBy 2021-09-14 13:13:28 +01:00
c3db2f60d2
[UTIL][EXCEPTIONS] Introduce NotStoredLocallyException 2021-09-14 13:13:28 +01:00
6445a616a8
[ENTITY][Attachment] Raise mimetype max length to 64 characters and ensure we don't attempt to store more than that 2021-09-14 13:13:28 +01:00
d4d4f4e950
[TESTS] Cleanup attachment test data 2021-09-14 13:13:27 +01:00
6e6d1a946f
[TESTS] Remove MediaFileTest and move setup code to media data fixture 2021-09-14 13:13:27 +01:00
53f89ade85
[TESTS] Move Media fixtures to their own file, for organization 2021-09-14 13:13:27 +01:00
74d1874991
[DOCUMENTATION][Entity] Improve documentation on Entity::getWithPK, explaining the ways it can be used 2021-09-14 13:13:27 +01:00
060a5abef1
[ENTITY][Link] Sometimes URLs don't work, handle that 2021-09-14 13:13:27 +01:00
f690bc06ae
[ATTACHMENT] Some attachments don't have thumbnails and that's okay 2021-09-14 13:13:27 +01:00
b4a03b814f
[CORE][GSFile] ensureFilenameWithProperExtension: extension isn't an I/O param 2021-09-14 13:13:26 +01:00
728f8d8fb8
[ENTITY][Note] Add getter for note links 2021-09-14 13:13:26 +01:00
9e4cac0123
[ENTITY] Refactor RemoteURL entities to Link
RemoteURL was being an awfully confusing term.
2021-09-14 13:13:26 +01:00
968e3431e1
[Attachment] Sometimes we can't provide download of original file 2021-09-14 13:13:26 +01:00
4cc4523632
[Posting] Re-add original file to attachment on upload, if it was previously removed 2021-09-14 13:13:26 +01:00
d076781c74
[AttachmentToNote][Attachment] Add title getter to Attachment 2021-09-14 13:13:26 +01:00
bac18715c5
[StoreRemoteMedia] Implement the first version of it in v3 2021-09-14 13:13:25 +01:00
63cbf4052f
[UTIL] Common::config wasn't a proper port from v2, it has to accept one argument only as well 2021-09-14 13:13:25 +01:00
33cc9386d2
[RemoteURLToAttachment] Fix primary key, relation is: One Attachment Has Many URLs, One URL Has One Attachment 2021-09-14 13:13:25 +01:00
78c5c4b084
[Attachment] Allow to delete the associated file 2021-09-14 13:13:25 +01:00
508f1f8796
[MODULES] Add module configuration 2021-09-14 13:13:25 +01:00
de8a2f579c
[CORE][Event] Fix bug on handler Log 2021-09-14 13:13:25 +01:00
4ecdeac6a3
[CORE][Entity] Compare with object properties when creating/updating, instead of class 2021-09-14 13:13:25 +01:00
75f70f8182
[ENTITY][Posting] Remove GSActorToRemoteURL, Fix URL database store 2021-09-14 13:13:25 +01:00
f5175cc59d
[ATTACHMENTS] Always store in the same location 2021-09-14 13:13:24 +01:00
3f61537140
[ENTITY] Split Attachment in various new entities
Remove Attachment Scope
Fixed some minor bugs

Scope will be implemented later in v3. It doesn't make sense to have
the scope handling being per attachment. Different actors can post
the same attachment with different scopes. The attachment controller
will assume the highest level of scope applied to the attachment and
the rest will be handled at the note level.

Motivation:
* Remove title from attachment, as it's part of the relation between attachment and note.
* Remove actor from attachment, many actors may publish the same attachment.
* Remove is_local from attachment,  as it's part of the relation between attachment and note.
* Remove remote_url from attachment, different urls can return the same attachment.

Addition:
* Attachment now has a lives attribute,  it's a reference counter with a nicer name
* GSActorToAttachment
* GSActorToRemoteURL
* RemoteURL
* RemoteURLToNote
* RemoteURLToAttachment
* AttachmentToNote now has a title attribute
2021-09-14 13:13:24 +01:00
39006fb6b5
[DB][Attachments] Use count function rathar than fetch and count, rename to refCount, rather than countDepencies 2021-09-14 13:13:24 +01:00
809bf00aa9
[TemporaryFile][TESTS] Throw on attempt to write to null resource and fix tests 2021-09-14 13:13:24 +01:00
6728dd40b0
[ENTITY] Add JsonSerializable interface to Entity base class and implement it for the Note class 2021-09-14 13:13:24 +01:00
2851b899b8
[TESTS] Add test annotations to core classes 2021-09-14 13:13:23 +01:00
21a5bbe639
[CORE][Controller] Fix JSON response and add test annotations 2021-09-14 13:13:23 +01:00
061a85d6b3
[EVENTS] Change FormatNoteList do separate in and out arguments
This is necessary due to some weird problem which I wasn't able to figure out (but which doesn't matter)
that somehow causes the event to be called twice during testing, and thus the function was exploding
2021-09-14 13:13:23 +01:00
b5de80303a
[TEST] Raise test coverage for UserPanel to 100% 2021-09-14 13:13:23 +01:00
480665afc8
[CONTROLLER][UserPanel] Finish implementation of ::notifications so it actually saves the values in the database 2021-09-14 13:13:23 +01:00
cdf3426567
[CONTROLLR][UserPanel][PLUGINS] Add submit button to notification settings for each transport 2021-09-14 13:13:23 +01:00
afbcb179b2
[CONTROLLER][AdminPanel] Further ensure form validity 2021-09-14 13:13:23 +01:00
38a331220f
[CORE][Log] Add Log::unexpected_exception utility which logs and throws a ServerException 2021-09-14 13:13:23 +01:00
085e880631
[CORE][Entity] Fix implementation of createOrUpdate so it doesn't throw NotFoundException if trying to create an object
This was previously done because we wanted to notify the callee that
and entity existed but not with the provided contents. With the change
of return value, with a bool $is_update, this is no longer a problem.
2021-09-14 13:13:22 +01:00
1b623a85ae
[UTIL][FormFields] Move FormFields class to Util\Form namespace 2021-09-14 13:13:22 +01:00
1647c5391f
[Favourite][TWIG][CSS] Favourite now works. 2021-09-14 13:13:22 +01:00
21362d1e4d
[ATTACHMENTS] Add dependencies counter 2021-09-14 13:13:21 +01:00
3334aca7b9
[Avatar] Move entity from core to component 2021-09-14 13:13:20 +01:00
fb6aa78ae8
[CORE][GSFile] Allow storing files under /file 2021-09-14 13:13:20 +01:00
e688bf8aed
[TESTS] Ignore coverage of ResetPasswordRequest, as it uses mailing functionality. We may want to introduce this test in the future 2021-09-14 13:13:20 +01:00
9ad2cb5e66
[UTIL][FormFields] Allow specifying whether a password is required and provide placeholder text 2021-09-14 13:13:20 +01:00
5aedf64e5b
[ROUTES] Remove individual settings pages, as they got merged 2021-09-14 13:13:20 +01:00
27f2fbdade
[ENTITY] Refactor LocalUser::changePassword for easier use 2021-09-14 13:13:20 +01:00
19318b3163
[UTIL][EXCEPTION] Add AuthenticationException, representing an auth error, status code 401 unauthorized 2021-09-14 13:13:20 +01:00
a1592656e0
[TESTS] Change format of data fixtures to allow creating more users 2021-09-14 13:13:20 +01:00
2dd3511149
[CORE][DB] Specify desired case in array_change_case, for clarity 2021-09-14 13:13:19 +01:00
0ae67d96ea
[TESTS] Raise test coverage for AdminPanel to 100% 2021-09-14 13:13:19 +01:00
b77e35ef09
[SECURITY] Do not require email when in development 2021-09-14 13:13:19 +01:00
fe7c2b5115
[TESTS] Raise test coverage for AdminPanel controller to 100% 2021-09-14 13:13:19 +01:00
e0a0df502e
[TESTS] Raise test coverage for Attachment controller to 100% 2021-09-14 13:13:19 +01:00
29d77b446f
[TESTS] Add a sample image to the test dataset 2021-09-14 13:13:19 +01:00
647e4c03b3
[CORE][GSFile] Ensure files are stored inside the configured storage folder, with a relative filename in the database 2021-09-14 13:13:19 +01:00
51f8f004b3
[CORE][CONTROLLER] Add TODO to Controller base class as to where our custom exception pages would be implemented 2021-09-14 13:13:18 +01:00
0b80727769
[CORE][ENTITY] Allow create'ing will null values 2021-09-14 13:13:18 +01:00
855d427442
[UTIL][FORM] Create a utility class that defines common form fields, such as passwords 2021-09-14 13:13:18 +01:00
dfc97d2607
[TESTS] Raise test coverage for Controller/Security to 100% 2021-09-14 13:13:18 +01:00
dc2b9f940e
[CORE][GSFile] Assert that the destination folder where to store the attachment is inside the INSTALLDIR and store the filepath in the database 2021-09-14 13:13:18 +01:00
8139a21eb9
[TESTS] Add coverage ignore to TemplateController and ResetPassword (as it requires sending emails) 2021-09-14 13:13:18 +01:00
518995d155
[CONTROLLER][Attachment] Assert that the supplied is positive and add documentation 2021-09-14 13:13:17 +01:00
88dd9e542f
[CORE][GSFile] Change actor_id paramenter of validateAndStoreFileAsAttachment to optional and reorder them and their usages 2021-09-14 13:13:17 +01:00
7bd88bd101
[AUTOGENERATED] Update entity fields for ResetPasswordRequest entity 2021-09-14 13:13:17 +01:00
471dc52c92
[CORE] Add repositories, as needed by the Reset Password Bundle 2021-09-14 13:13:17 +01:00
0c54a3297f
[UTIL] Add a class that defines commonly used form fields 2021-09-14 13:13:17 +01:00
ccd5ebf8e4
[CORE] Add passowrd reset and forgot password functionality 2021-09-14 13:13:17 +01:00
769fff2448
[CORE][SECURITY][EMAIL] Move email confirmation functionality to it's own static wrapper, in preparation for adding password reset functionality 2021-09-14 13:13:17 +01:00
e27823ae6c
[CONTROLLER][Security] Refactor and make clearer errors with duplicate nicknames and emails. Return notes as a callable, since they're not used in the default template, in the login and register pages 2021-09-14 13:13:17 +01:00
32ca61e214
[TESTS][Queue] Add @codeCoverageIgnore to select queueing functions 2021-09-14 13:13:16 +01:00
41e4e2de0e
[TESTS][Router] Add tests for Router and use named paramenters, as we can since PHP8 2021-09-14 13:13:16 +01:00
6d22932092
[ENTITY][LocalUser] Add method 'findByNicknameOrEmail' 2021-09-14 13:13:16 +01:00
e6d20bd30d
[CORE][Controller][TESTS] Fix issue that arrises in tests where the Accept header is not specified 2021-09-14 13:13:16 +01:00
d07cb79844
[EXCEPTION] Add Email related exceptions 2021-09-14 13:13:16 +01:00
e250edf7fd
[UTIL][Nickname] Refactor Nickname and extract a validate function, as we'll want to perform normalization in select cases in the future, likely as a plugin 2021-09-14 13:13:16 +01:00
f904b76ce7
[TESTS][DataFixtures] Add password and email to created test user 2021-09-14 13:13:16 +01:00
efacf6da56
[TESTS][Twig] Add @codeCoverageIgnore to select methods, as these are simple wrappers 2021-09-14 13:13:16 +01:00
e77498ac19
[ENTITY] Remove 'normalized_nickname' field from GSActor as that feature will be moved to a plugin 2021-09-14 13:13:15 +01:00
2f69579ddb
[TESTS][DOCUMENTATION][Module] Add documentation and exclude method from testing in Module base class 2021-09-14 13:13:15 +01:00
7a2574eafb
[CORE][TemporaryFile] Add option to specify attempts and better handle when reaching the attemp limit without being able to create a file 2021-09-14 13:13:15 +01:00
f5fb4ed3c3
[TESTS] Add tests for GSFile 2021-09-14 13:13:15 +01:00
af5526d720
[DB] Refactor findOneBy method 2021-09-14 13:13:15 +01:00
7263752b18
[TESTS][DOCUMENTATION] Add documenation for the list events command and exclude it from unit testing 2021-09-14 13:13:15 +01:00
1c09aefd5a
[CONFIG] Make password length limits configurable 2021-09-14 13:13:14 +01:00
de5650e98e
[TESTS] Exclude class Security from testing, as it's a simple wrapper 2021-09-14 13:13:14 +01:00
d609dafdbc
[TESTS] Raise test coverage for ModuleManager to 100% 2021-09-14 13:13:14 +01:00
bd321f05a7
[TESTS] Exclude HTTPClient from testing, as it's a simple wrapper and we don't want to be performing HTTP requests in tests, for speed and reliability 2021-09-14 13:13:14 +01:00
2ee99e5176
[TESTS] Raise test coverage for Form to 100% 2021-09-14 13:13:14 +01:00
3b18853ff1
[TESTS][LOG] Raise test coverage for Log class to 100% 2021-09-14 13:13:14 +01:00
f98ce1c3d0
[TESTS] Ignore GNUsocial class from tests, as it simply pipes objects around 2021-09-14 13:13:13 +01:00
3cc1756d1b
[FORM][DOCUMENTATION] Add documentation to Form class 2021-09-14 13:13:13 +01:00
f9a022745e
[EVENT] Fixup implementation, as imformed by tests 2021-09-14 13:13:13 +01:00
d22711504c
[ENTITY] Fixup implementation, as imformed by tests 2021-09-14 13:13:13 +01:00
8317c612ff
[DB] Handle using methods with class name as well as table name and add lookup methods 2021-09-14 13:13:13 +01:00
bfe9c6c9c4
[TESTS] Add ignore annotations to code paths that serve as hooks in DependencyInjection 2021-09-14 13:13:13 +01:00
28c010fcc7
[TESTS][CACHE] Fixup errors found in cache implementation by testing. Ensure the newest values are kept, in pushList with max_count 2021-09-14 13:13:12 +01:00
e2f61b05d8
[ENTITY] Fix foreign key type in Cover entity, as found by tests 2021-09-14 13:13:12 +01:00
6dd0292397
[SETTINGS][ROUTES][CONTROLLER] Settings overhaul, refactoring to accommodate new global settings view. WIP, component settings aren't shown at the moment.
Signed-off-by: Eliseu Amaro <mail@eliseuama.ro>
2021-09-14 13:13:12 +01:00
367cc5c5c7
[DOCS][Dev] Add Queues 2021-09-14 13:13:11 +01:00
27fb2da1d0
[DOCS][Dev] Add Internationalisation 2021-09-14 13:13:11 +01:00
ce39f6ca4a
[DOCS][Dev] Add Routes and Controllers 2021-09-14 13:13:10 +01:00
c020958690
[DOCS] Write exceptions chapter 2021-09-14 13:13:09 +01:00
80cde06f4b
[MEDIA][Thumbnail] Fix non-instantiated variable 2021-09-14 13:13:04 +01:00
cb7fa0a081
[SECURITY] Remove aggressive normalization of nicknames. This will be moved to a plugin in the future and we'll open an RFC, as discussed 2021-09-14 13:13:04 +01:00
a5348f2427
[MEDIA][AttachmentThumbnail] Add mimetype to Entity 2021-09-14 13:13:04 +01:00
861732176e
[Media] Support any kind of thumbnails in the Core
Sanitize Attachments instead of Validate (part 1)
Ensure the intended filetypes and mimetypes during Vips conversions (part 1)
Various bug fixes
2021-09-14 13:13:03 +01:00
481e953cde
[Media] File quota should be triggered by the Core 2021-09-14 13:13:03 +01:00
72dcff22f7
[MEDIA] We need permissions to run chmod in directories
It's better to have in the filename data that we couldnt't otherwise rapidly retrieve
2021-09-14 13:13:03 +01:00
6ecdaa5d72
[MEDIA] Fix database misses on thumbnail retrieval
We were storing the real scaling values instead of the predictions, but the core is never able to pre-compute the real values generated by the encoding plugins so, we have to rely on our own aproximation function ported from v2
2021-09-14 13:13:03 +01:00
c8cf8c3f13
[FILE][TemporaryFile] Fix various issues now that we also have Symfony's file abstractions 2021-09-14 13:13:03 +01:00
8817613016
[CORE][GNUsocial] Fix undefined property typo 2021-09-14 13:13:03 +01:00
9f553707ba
[CORE] Proxies: constant HEADER_X_FORWARDED_ALL is deprecated
Give ENV preference over SERVER
2021-09-14 13:13:02 +01:00
687b2e2bc7
[UTIL] Add utility to flatten the result of note queries 2021-09-14 13:13:02 +01:00
74f477489b
[TESTS] Raise test coverage for App\Controller\Network to 100% and fixup related code 2021-09-14 13:13:02 +01:00
86400ce815
[UTIL] Provide static access to current request and utilities in Common 2021-09-14 13:13:02 +01:00
9198797aea
[CORE] Throw more meaningfull error when method doesn't exist in Security and Entity 2021-09-14 13:13:02 +01:00
6d93b6fb32
[TESTS] Raise App\Core\DB\DB test coverage to 100% and fix issues found 2021-09-14 13:13:01 +01:00
b9fbed2e3d
[CORE] Clarify message when calling non existent method in Entity 2021-09-14 13:13:01 +01:00