Hugo Sales
c3db2f60d2
[UTIL][EXCEPTIONS] Introduce NotStoredLocallyException
2021-09-14 13:13:28 +01:00
Diogo Peralta Cordeiro
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
Hugo Sales
809bf00aa9
[TemporaryFile][TESTS] Throw on attempt to write to null resource and fix tests
2021-09-14 13:13:24 +01:00
Hugo Sales
2851b899b8
[TESTS] Add test annotations to core classes
2021-09-14 13:13:23 +01:00
Hugo Sales
1b623a85ae
[UTIL][FormFields] Move FormFields class to Util\Form namespace
2021-09-14 13:13:22 +01:00
Hugo Sales
9ad2cb5e66
[UTIL][FormFields] Allow specifying whether a password is required and provide placeholder text
2021-09-14 13:13:20 +01:00
Hugo Sales
19318b3163
[UTIL][EXCEPTION] Add AuthenticationException, representing an auth error, status code 401 unauthorized
2021-09-14 13:13:20 +01:00
Hugo Sales
855d427442
[UTIL][FORM] Create a utility class that defines common form fields, such as passwords
2021-09-14 13:13:18 +01:00
Hugo Sales
0c54a3297f
[UTIL] Add a class that defines commonly used form fields
2021-09-14 13:13:17 +01:00
Hugo Sales
d07cb79844
[EXCEPTION] Add Email related exceptions
2021-09-14 13:13:16 +01:00
Hugo Sales
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
Hugo Sales
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
Diogo Peralta Cordeiro
c020958690
[DOCS] Write exceptions chapter
2021-09-14 13:13:09 +01:00
Hugo Sales
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
Diogo Peralta Cordeiro
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
Diogo Peralta Cordeiro
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
Diogo Peralta Cordeiro
c8cf8c3f13
[FILE][TemporaryFile] Fix various issues now that we also have Symfony's file abstractions
2021-09-14 13:13:03 +01:00
Hugo Sales
687b2e2bc7
[UTIL] Add utility to flatten the result of note queries
2021-09-14 13:13:02 +01:00
Hugo Sales
86400ce815
[UTIL] Provide static access to current request and utilities in Common
2021-09-14 13:13:02 +01:00
Hugo Sales
e1a1d01844
[TESTS] Add GNUsocialTestCase, which initializes our infrastructure when bootKernel is called
2021-09-14 13:13:01 +01:00
Hugo Sales
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
Hugo Sales
fc9b934bbc
[UTIL] Fix App\Util\TemporaryFile, adding default options and preventing warning on not enough permission
2021-09-14 13:12:59 +01:00
Hugo Sales
ec1081ed43
[UTIL] Rename and rewrite isTaken to checkTaken
2021-09-14 13:12:59 +01:00
Hugo Sales
a49ee453ab
[TESTS] Raise App\Util\HTML test coverage to 100%
2021-09-14 13:12:58 +01:00
Hugo Sales
fbea08ca9b
[TESTS] Raise App\Util\Bitmap test coverage to 100%
2021-09-14 13:12:58 +01:00
Hugo Sales
abda73b8e3
[TESTS] Raise App\Util\Common test coverage to 100%
2021-09-14 13:12:58 +01:00
Hugo Sales
2b83a4b627
[UTILS][TemporaryFile] Change way TemporaryFile takes arguments and it's internal implementation
2021-09-14 13:12:58 +01:00
Hugo Sales
3b39046a38
[UTIL] Fix bugs found in App\Util\Formatting by tests
2021-09-14 13:12:58 +01:00
Diogo Peralta Cordeiro
837f644458
[UTIL][Formatting] Add twigRenderFile
2021-09-14 13:12:55 +01:00
Hugo Sales
29457ef50d
[UTIL] Add option for setting a file suffix on TemporaryFile constructor and add missing TemporaryFileException
2021-09-14 13:12:54 +01:00
Hugo Sales
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
Hugo Sales
60a9085e56
[FORMATTING] Add utilities to remove affixes from strings
2021-09-14 13:12:51 +01:00
Hugo Sales
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
Hugo Sales
94edad43d9
[UTIL] Add method to validate url
2021-09-14 13:12:23 +01:00
Hugo Sales
1b8f5b7bf0
[DB] Make DB::findOneBy throw a different exception if two values are found
2021-09-14 13:12:23 +01:00
Hugo Sales
ae0e410986
[TESTS] Fix Nickname test
2021-09-14 13:12:23 +01:00
Diogo Peralta Cordeiro
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
Hugo Sales
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
Hugo Sales
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
Hugo Sales
faa362e2e2
[DB] Remove unique constraint from GSActor.nickname and fix register and related functionality
2021-09-14 13:10:23 +01:00
Hugo Sales
68de1b09b1
[NICKNAME] Don't throw when normalizing reserved nicknames
2021-09-14 13:10:23 +01:00
Hugo Sales
78548365da
[WEB] Fix translations and small inconsistency when opening on web
2021-09-14 13:10:23 +01:00
Hugo Sales
8b5bd40421
[TESTS] Add tests to all relevant methods under App\Util and fix errors that popup
2021-09-14 13:10:23 +01:00
Hugo Sales
57dad5eca4
[NICKNAME] Add nickname min length config and check it in Nickname::normalize
2021-09-14 13:10:23 +01:00
Hugo Sales
5afd2c9843
Duplicate src/Util/Exception/NicknameTooLongException.php history in src/Util/Exception/NicknameTooShortException.php history.
2021-09-14 13:10:23 +01:00
Hugo Sales
dc2a453e94
[TESTS] Add tests of Common and fix small oddities that pop up
2021-09-14 13:10:22 +01:00
Hugo Sales
b387ea9aa0
[TESTS] Fix error when testing cold redis cache
2021-09-14 13:10:22 +01:00
Hugo Sales
88e4044d02
[TESTS] Add tests for the bitmap utility and fix implementation
2021-09-14 13:10:22 +01:00
Hugo Sales
7e648a296f
CACHE] Fix cache implementation with the help of tests and remove premature optimization for non-redis list caching
...
This complicated the code significantly and likely didn't help that much, if at all. The recommended setup is using Redis, anyway, which is plenty optimized
2021-09-14 13:10:22 +01:00
Hugo Sales
c539f17ba5
[TESTS] Add App\Core\Cache test
2021-09-14 13:10:22 +01:00