aboutsummaryrefslogtreecommitdiff
path: root/test/plugs
AgeCommit message (Collapse)Author
2020-04-30Refactoring of :if_func / :unless_func plug options (general availability). ↵Ivan Tashkinov
Added tests for Pleroma.Web.Plug.
2020-04-21Automatic checks of authentication / instance publicity. Definition of ↵Ivan Tashkinov
missing OAuth scopes in AdminAPIController. Refactoring.
2020-04-17[#1682] Fixed Basic Auth permissions issue by disabling OAuth scopes checks ↵Ivan Tashkinov
when password is provided. Refactored plugs skipping functionality.
2020-04-15[#2349] Made :skip_plug/2 prevent plug from being executed even if ↵Ivan Tashkinov
explicitly called. Refactoring. Tests.
2020-04-15remote_ip plug adds remote_ip_found flagAlexander Strizhakov
2020-03-20Improved in-test `clear_config/n` applicability (setup / setup_all / in-test ↵Ivan Tashkinov
usage).
2020-03-18Improved in-test config management functions.Ivan Tashkinov
2020-03-16warnings fixAlexander Strizhakov
2020-03-15Merge branch '1560-non-federating-instances-routes-restrictions' into 'develop'lain
[#1560] Restricted AP- & OStatus-related routes for non-federating instances Closes #1560 See merge request pleroma/pleroma!2235
2020-03-15Merge branch 'fix/rate-limiter-remoteip-behavior' into 'develop'Haelwenn
rate limiter: disable based on if remote ip was found, not on if the plug was enabled Closes #1620 See merge request pleroma/pleroma!2296
2020-03-14Merge remote-tracking branch 'remotes/origin/develop' into ↵Ivan Tashkinov
1560-non-federating-instances-routes-restrictions # Conflicts: # lib/pleroma/plugs/static_fe_plug.ex
2020-03-13rate limiter: disable based on if remote ip was found, not on if the plug ↵rinpatch
was enabled The current rate limiter disable logic won't trigger when the remote ip is not forwarded, only when the remoteip plug is not enabled, which is not the case on most instances since it's enabled by default. This changes the behavior to warn and disable when the remote ip was not forwarded, even if the RemoteIP plug is enabled. Also closes #1620
2020-03-11Revert "Set better Cache-Control header for static content"rinpatch
On furher investigation it seems like all that did was cause unintuitive behavior. The emoji request flood that was the reason for introducing it isn't really that big of a deal either, since Plug.Static only needs to read file modification time and size to determine the ETag. Closes #1613
2020-03-09[#1560] Ensured authentication or enabled federation for federation-related ↵Ivan Tashkinov
routes. New tests + tests refactoring.
2020-03-06Merge remote-tracking branch 'remotes/origin/develop' into ↵Ivan Tashkinov
1560-non-federating-instances-routes-restrictions
2020-03-03Older copyright updatesMark Felder
2020-03-03Update CopyrightsMark Felder
2020-03-02[#1560] Added tests for non-federating instance bahaviour to ↵Ivan Tashkinov
ActivityPubControllerTest.
2020-03-02Bump copyright years of files changed after 2020-01-07Haelwenn (lanodan) Monnier
Done via the following command: git diff fcd5dd259a1700a045be902b43391b0d1bd58a5b --stat --name-only | xargs sed -i '/Pleroma Authors/c# Copyright © 2017-2020 Pleroma Authors <https:\/\/pleroma.social\/>'
2020-03-02Bump copyright years of files changed after 2019-01-01Haelwenn (lanodan) Monnier
Done via the following command: git diff 1e6c102b --stat --name-only | cat - | xargs sed -i 's/2017-2018 Pleroma Authors/2017-2019 Pleroma Authors/'
2020-03-01rate limiter: Fix a race conditionrinpatch
When multiple requests are processed by rate limiter plug at the same time and the bucket is not yet initialized, both would try to initialize the bucket resulting in an internal server error.
2020-02-29[#2250] Tiny refactoring per merge request review.Ivan Tashkinov
2020-02-27Runtime configurability of RateLimiter. Refactoring. Disabled default rate ↵Ivan Tashkinov
limits in tests.
2020-02-20Merge branch 'require-signature' into 'develop'lain
Add an option to require fetches to be signed Closes #1444 See merge request pleroma/pleroma!2071
2020-02-13Tweaks to `clear_config` calls in tests in order to prevent side effects on ↵Ivan Tashkinov
config during test suite execution.
2020-01-30Merge branch 'develop' into fix/disable-rate-limiter-for-socket-localhostrinpatch
2019-12-19Merge remote-tracking branch 'remotes/origin/develop' into ↵Ivan Tashkinov
oauth-scopes-tweaks-and-tests
2019-12-19Verify HTTP signatures only when request accepts "activity+json" typeEgor Kislitsyn
2019-12-17Merge branch 'develop' into fix/disable-rate-limiter-for-socket-localhostMaxim Filippov
2019-12-16Apply suggestion to test/plugs/http_signature_plug_test.exsminibikini
2019-12-16Add an option to require fetches to be signedEgor Kislitsyn
2019-12-16tests: remove a useless sleep in rate limiter testsrinpatch
It was used to check that authenticated and unauthenticated users have different limits. Instead of sleeping a super low limit for unauthenticated users was set, preventing them from doing 5 requests in the first place.
2019-12-15OAuthScopesPlug: disallowed nil token (unless with :fallback option). WIP: ↵Ivan Tashkinov
controller tests modification: OAuth scopes usage.
2019-12-14Disable rate limiter for socket/localhost (unless RemoteIp is enabled)Maxim Filippov
2019-12-11[#1427] Fixed `:admin` option handling in OAuthScopesPlug, added tests.Ivan Tashkinov
2019-12-07[#1427] Extra check that admin OAuth scope is used by admin. Adjusted tests.Ivan Tashkinov
2019-12-06[#1427] Fixes / improvements of admin scopes support. Added tests.Ivan Tashkinov
2019-11-19Support authentication via `x-admin-token` HTTP headerEgor Kislitsyn
2019-11-15Merge branch 'bugfix/1395-email-activation' into 'develop'rinpatch
Bugfix/1395 email activation Closes #1395 See merge request pleroma/pleroma!1965
2019-11-13Fix random fails of the rate limiter testsEgor Kislitsyn
2019-11-11New rate limiterSteven Fuchs
2019-11-11UserEnabledPlug: Don't authenticate unconfirmed users.lain
2019-11-06Set better Cache-Control header for static contentrinpatch
Closes #1382
2019-10-16[#1304] Moved all non-mutes / non-blocks fields from User.Info to User. WIP.Ivan Tashkinov
2019-10-02[#1234] Merge remote-tracking branch 'remotes/upstream/develop' into ↵Ivan Tashkinov
1234-mastodon-2-4-3-oauth-scopes # Conflicts: # CHANGELOG.md # lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex # lib/pleroma/web/router.ex
2019-09-27Add `remote_ip` plugminibikini
2019-09-19[#1234] Merge remote-tracking branch 'remotes/upstream/develop' into ↵Ivan Tashkinov
1234-mastodon-2-4-3-oauth-scopes # Conflicts: # lib/pleroma/web/admin_api/admin_api_controller.ex
2019-09-18Bump copyright years of files changed in 2019Haelwenn (lanodan) Monnier
Done via the following command: git diff 1e6c102bfcfe0e4835a48f2483f2376f9bf86a20 --stat --name-only | cat - | xargs sed -i 's/2017-2018 Pleroma Authors/2017-2019 Pleroma Authors/'
2019-09-17[#1234] Addressed code analysis issue.Ivan Tashkinov
2019-09-17[#1234] Defined admin OAuth scopes, refined other scopes. Added tests.Ivan Tashkinov