Commit Graph

41 Commits

Author SHA1 Message Date
Diogo Peralta Cordeiro afb7ae0f75
[CORE][Util][Exception] Add log context to BugFoundException 2022-01-02 23:50:15 +00:00
Hugo Sales ec28f23025
[TOOLS] Run CS-fixer on all files 2021-12-26 19:16:15 +00:00
Hugo Sales 25900d38bd
[UTIL][EXCEPTION][RedirectException] Remove hack that would attempt to generate a URL inplace 2021-12-21 12:46:02 +00:00
Eliseu Amaro 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
Hugo Sales 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
Hugo Sales b1262919da
[TOOLS] Fix (most) issues found by PHPStan 2021-11-25 23:08:30 +00:00
Hugo Sales 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
Eliseu Amaro e54e55dfbf
[EXCEPTION][RedirectException] You are now able to redirect to a specific url. 2021-10-27 20:44:50 +01:00
Diogo Peralta Cordeiro bccafd0d7b
[CORE][GSFile] Respect mimetype whitelist and extensions blacklist before saving files 2021-10-27 04:19:33 +01:00
Hugo Sales 9109c61af5
[TOOLS][CS-FIXER] Run new PHP CS Fixer config. Notably, adds strict_types 2021-10-27 04:19:28 +01:00
Diogo Peralta Cordeiro 03f6029ce5
[SECURITY] Fix nickname validation and properly allow email auth 2021-10-18 13:22:55 +01:00
Diogo Peralta Cordeiro 941cbe6599
[Actor] Refactor GSActor into Actor 2021-09-18 05:12:17 +01:00
Eliseu Amaro e9d809d441 [Security][Exception] Security exception handling, login and register. TODO EmailNotFoundException and NicknameNotFoundException. 2021-09-15 14:48:06 +01:00
Hugo Sales 277a080d7c
[EXCEPTION] Add `NotImplementedException` 2021-09-14 13:13:42 +01:00
Hugo Sales 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
Hugo Sales 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
Hugo Sales 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
Diogo Peralta Cordeiro 2b457655ea
[CORE] Fix path configuration 2021-09-14 13:13:35 +01:00
Hugo Sales c3db2f60d2
[UTIL][EXCEPTIONS] Introduce NotStoredLocallyException 2021-09-14 13:13:28 +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 d07cb79844
[EXCEPTION] Add Email related exceptions 2021-09-14 13:13:16 +01:00
Diogo Peralta Cordeiro c020958690
[DOCS] Write exceptions chapter 2021-09-14 13:13:09 +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 1b8f5b7bf0
[DB] Make DB::findOneBy throw a different exception if two values are found 2021-09-14 13:12: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 78548365da
[WEB] Fix translations and small inconsistency when opening on web 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 c539f17ba5
[TESTS] Add App\Core\Cache test 2021-09-14 13:10:22 +01:00
Diogo Machado f18a2a4bb6
[STATIC ANALYSIS] Started removal process for the errors found by PHPStan 2021-09-14 13:10:16 +01:00
Hugo Sales 460712e15e
[GIT] Change my email to the new one in all files and bump copyright year 2021-09-14 13:06:56 +01:00
Hugo Sales 63d2d58e9e
[EXCEPTION] Make findOne return NotFoundException 2021-09-14 13:06:52 +01:00
Hugo Sales c07a0cdcd5
[EXCEPTION] Add base class to invalid form exception and add URL arguments to redirect exception 2021-09-14 13:06:52 +01:00
Hugo Sales 4c15271d36
[UI] Display error when submitted form is invalid 2021-09-14 13:06:51 +01:00
Hugo Sales b906dde059
[EXCEPTION][UI][UX] Add RedirectException, which can be thrown anywhere to redirect somewhere, and an exception handler 2021-09-14 13:06:51 +01:00
Hugo Sales 6165f7cd55
[Media] Display images and videos inline in notes 2021-09-14 13:06:49 +01:00
Hugo Sales d95c22cb3e
[EXCEPTION] Fix exceptions not being translated 2021-09-14 13:06:48 +01:00
Hugo Sales 0b50905ac8
[NOTE][UI] Add note replying and UI displaying 2021-09-14 13:06:45 +01:00
Hugo Sales 365168d03e
[EXCEPTION] Add ServerException and inherit previous throwable
imported from v2/5ea5d3007563f76a77efbfb66936315441922542
2021-09-14 13:05:51 +01:00
Hugo Sales 4128a5403d
[MEDIA][EXCEPTIONS] Fix errors and deprecations 2021-09-14 13:05:51 +01:00
Hugo Sales d0771f77bc
[UTIL][NICKNAME] Import nickname utilities and exceptions from v2 2021-09-14 13:05:38 +01:00