Commit Graph

234 Commits

Author SHA1 Message Date
c720ce7daf
[UTIL][Functional] Add cartesianProduct while it doesn't get merged upstream to \Functional 2021-12-10 13:53:23 +00:00
e29e1cc87c
[ENTITY] Rename 'getFrom' to 'getBy' 2021-12-05 17:55:46 +00:00
4501b7e85e
[CONTROLLER][UserPanel] Re-organised all settings forms. Added email, password, language forms separated from account or personal account info
[CORE][Form] Better PHPDoc and used is_null() for checks

[ENTITY][LocalUser] Add setNicknameSanitisedAndCached

[UTIL][Exception] Better NicknameNotAllowedException default message
2021-12-03 03:32:43 +00:00
475bb1a033
[UTIL][EXCEPTION][BugFoundException] Use only the relative path, for convenience and to avoid potentially leaking the sysadmin's user 2021-12-01 19:47:42 +00:00
424df54a1b
[ActivityPub] Add HTTP Signatures 2021-12-01 19:47:41 +00:00
6680772e47
[UI][I18N][UTIL][FormFields][Language][COMPONENTS][Posting][PLUGINS][Reply] Factor out translation from FormFields::language and remove help text in cases from Posting and Reply 2021-11-29 22:42:50 +00:00
66ff3c594d
[UTIL][Formatting] Fix wrong event name 2021-11-29 22:42:49 +00:00
56526c9ba6
[ActivityPub][Inbox] Restore Create Note Functionality
Minor bug fixes
2021-11-29 22:42:46 +00:00
7b9d388a44
[NOTIFICATION] Implement Target Collector 2021-11-27 15:14:15 +00:00
edf1b30e89
[TOOLS][DOCS] Add missing doc blocks 2021-11-25 23:16:04 +00:00
b1262919da
[TOOLS] Fix (most) issues found by PHPStan 2021-11-25 23:08:30 +00:00
98b719dca3
[COMPONENTS][Tag] Split tag into words and stem each 2021-11-25 20:37:53 +00:00
2d057024b9
[TAGS][ENTITY][Note] Properly store the note language, pass it along when rendering content. Add mechanism for stemming tags, with fallback to simply slug-ifying them 2021-11-25 20:37:53 +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
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
f07dce4604
[UTIL][Form] Fix bug with repeated_password 2021-11-16 23:27:29 +00:00
5cafc80d01
[UTIL][FormFields] Refactor duplicated language choice form entry logic 2021-11-15 19:25:52 +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
98352cfece
[TESTS] Properly provide both createClient and bootKernel in test base class 2021-11-11 12:39:36 +00:00
f98afd15ce
[ENTITY] Refactor Follow as Subscription 2021-11-08 16:14:23 +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
712d1739e4
[UTIL][Formatting] Make local mentions great again 2021-11-01 12:16:29 +00: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
e54e55dfbf
[EXCEPTION][RedirectException] You are now able to redirect to a specific url. 2021-10-27 20:44:50 +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
299e893ca9
[TOOLS][PHPStan][DocCheck] Fix errors found by PHPStan and Doc Check 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
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
44cf1fa24c
[UTIL][Nickname] Fix some parameters issues found with strict types 2021-10-27 04:19:29 +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
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
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
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
941cbe6599
[Actor] Refactor GSActor into Actor 2021-09-18 05:12:17 +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
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
e9d809d441 [Security][Exception] Security exception handling, login and register. TODO EmailNotFoundException and NicknameNotFoundException. 2021-09-15 14:48:06 +01:00
b74d944ae3
[TOOLS][PHPStan] Raise PHPStan level to 3 and fix new errors 2021-09-14 13:13:45 +01:00
4e30e5aad9
[TOOLS] Fix all issues found by PHPStan level 2 2021-09-14 13:13:44 +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
cbbef90752
[UTIL][CONFIG] Ensure setConfig uses a locals key 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
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
2b457655ea
[CORE] Fix path configuration 2021-09-14 13:13:35 +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
c3db2f60d2
[UTIL][EXCEPTIONS] Introduce NotStoredLocallyException 2021-09-14 13:13:28 +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
809bf00aa9
[TemporaryFile][TESTS] Throw on attempt to write to null resource and fix tests 2021-09-14 13:13:24 +01:00
2851b899b8
[TESTS] Add test annotations to core classes 2021-09-14 13:13:23 +01:00
1b623a85ae
[UTIL][FormFields] Move FormFields class to Util\Form namespace 2021-09-14 13:13:22 +01:00
9ad2cb5e66
[UTIL][FormFields] Allow specifying whether a password is required and provide placeholder text 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
855d427442
[UTIL][FORM] Create a utility class that defines common form fields, such as passwords 2021-09-14 13:13:18 +01:00
0c54a3297f
[UTIL] Add a class that defines commonly used form fields 2021-09-14 13:13:17 +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
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
c020958690
[DOCS] Write exceptions chapter 2021-09-14 13:13:09 +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
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
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
c8cf8c3f13
[FILE][TemporaryFile] Fix various issues now that we also have Symfony's file abstractions 2021-09-14 13:13:03 +01:00
687b2e2bc7
[UTIL] Add utility to flatten the result of note queries 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
e1a1d01844
[TESTS] Add GNUsocialTestCase, which initializes our infrastructure when bootKernel is called 2021-09-14 13:13:01 +01:00
fbe0f36a53
[TESTS] Expand test coverage for App\Util\Forms\ArrayTransformer, App\Util\Notification and App\Twig\Runtime 2021-09-14 13:13:00 +01:00
fc9b934bbc
[UTIL] Fix App\Util\TemporaryFile, adding default options and preventing warning on not enough permission 2021-09-14 13:12:59 +01:00
ec1081ed43
[UTIL] Rename and rewrite isTaken to checkTaken 2021-09-14 13:12:59 +01:00
a49ee453ab
[TESTS] Raise App\Util\HTML test coverage to 100% 2021-09-14 13:12:58 +01:00
fbea08ca9b
[TESTS] Raise App\Util\Bitmap test coverage to 100% 2021-09-14 13:12:58 +01:00
abda73b8e3
[TESTS] Raise App\Util\Common test coverage to 100% 2021-09-14 13:12:58 +01:00
2b83a4b627
[UTILS][TemporaryFile] Change way TemporaryFile takes arguments and it's internal implementation 2021-09-14 13:12:58 +01:00
3b39046a38
[UTIL] Fix bugs found in App\Util\Formatting by tests 2021-09-14 13:12:58 +01:00
837f644458
[UTIL][Formatting] Add twigRenderFile 2021-09-14 13:12:55 +01:00
29457ef50d
[UTIL] Add option for setting a file suffix on TemporaryFile constructor and add missing TemporaryFileException 2021-09-14 13:12:54 +01:00
708a910870
[UTIL] Fix remove affix utilities, so they only try to remove an affix if the string starts/ends with it 2021-09-14 13:12:52 +01:00
60a9085e56
[FORMATTING] Add utilities to remove affixes from strings 2021-09-14 13:12:51 +01:00
2a74dced22
[UTIL] Add TemporaryFile class, courtesy of Alexei Sorokin from v2, a class that ensures files stored in /tmp are removed, as it doesn't happen in some cases 2021-09-14 13:12:51 +01:00
94edad43d9
[UTIL] Add method to validate url 2021-09-14 13:12:23 +01:00
1b8f5b7bf0
[DB] Make DB::findOneBy throw a different exception if two values are found 2021-09-14 13:12:23 +01:00
ae0e410986
[TESTS] Fix Nickname test 2021-09-14 13:12:23 +01:00
0eaccc32fe
[ATTACHMENTS] Further refactoring
Some key points:
- Components and Plugins shouldn't extend Module directly
- Avatars should be fetched via GSActor ID, not by nickname as that isn't unique
- Avatar now is a separate Component
- Common file utilities are now to be placed in Core\GSFile, this will
  handle storage and trigger validation
- Some bug fixes
2021-09-14 13:11:51 +01:00
299bc5b551
[TWIG] Add way to launch events from TWIG, capture service and add way to render from a string 2021-09-14 13:11:49 +01:00
e2e561e663
[DB][FKEY] Temporarily disable foreign key mapping, as there seems to be a bug in doctrine, which is under investigation 2021-09-14 13:10:23 +01:00