Ivan Tashkinov
2c4844237f
Refactoring of :if_func / :unless_func plug options (general availability). Added tests for Pleroma.Web.Plug.
4 years ago
Ivan Tashkinov
908cf22a6c
Merge remote-tracking branch 'remotes/origin/develop' into automatic-authentication-and-instance-publicity-checks
...
# Conflicts:
# lib/pleroma/web/mastodon_api/controllers/account_controller.ex
4 years ago
Alex Gleason
1bd9749a8f
Let blob: pass CSP
4 years ago
Ivan Tashkinov
2958a7d246
Fixed OAuth restrictions for :api routes. Made auth info dropped for :api routes if OAuth check was neither performed nor explicitly skipped.
4 years ago
Ivan Tashkinov
f685cbd309
Automatic checks of authentication / instance publicity. Definition of missing OAuth scopes in AdminAPIController. Refactoring.
4 years ago
Ivan Tashkinov
66f55106bd
[ #1682 ] Fixed Basic Auth permissions issue by disabling OAuth scopes checks when password is provided. Refactored plugs skipping functionality.
4 years ago
Ivan Tashkinov
bde1189c34
[ #2349 ] Made :skip_plug/2 prevent plug from being executed even if explicitly called. Refactoring. Tests.
5 years ago
Ivan Tashkinov
bedf92e064
Merge remote-tracking branch 'remotes/origin/develop' into authenticated-api-oauth-check-enforcement
5 years ago
Haelwenn
b1c1d2e5e1
Merge branch 'fix/1659-rate-limiter' into 'develop'
...
remote_ip plug adds remote_ip_found flag
Closes #1659
See merge request pleroma/pleroma!2390
5 years ago
Alexander Strizhakov
22bde21c4f
remote_ip plug adds remote_ip_found flag
5 years ago
lain
6bc76df287
Uploads: Sandbox them in the CSP.
5 years ago
Maksim Pechnikov
c4e7ed660c
fix logger message
5 years ago
Ivan Tashkinov
fc81e5a49c
Enforcement of OAuth scopes check for authenticated API endpoints, :skip_plug plug to mark a plug explicitly skipped (disabled).
5 years ago
rinpatch
c46d035f7b
rate limiter: disable based on if remote ip was found, not on if the plug 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
5 years ago
lain
fa4ec17c84
Merge branch '1560-non-federating-instances-routes-restrictions' into 'develop'
...
[#1560 ] Restricted AP- & OStatus-related routes for non-federating instances
Closes #1560
See merge request pleroma/pleroma!2235
5 years ago
Haelwenn
67a27825b1
Merge branch 'fix/rate-limiter-remoteip-behavior' into 'develop'
...
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
5 years ago
rinpatch
0b823755a2
Merge branch 'fix/cache-control-headers' into 'develop'
...
Fix Cache Control headers on media
See merge request pleroma/pleroma!2295
5 years ago
Phil Hagelberg
bd80ff9a6c
Fix static FE plug to handle missing Accept header.
5 years ago
Ivan Tashkinov
ecb7809e92
Merge remote-tracking branch 'remotes/origin/develop' into 1560-non-federating-instances-routes-restrictions
...
# Conflicts:
# lib/pleroma/plugs/static_fe_plug.ex
5 years ago
rinpatch
d88c8a9614
Merge branch 'fix/cache-control-headers' into 'develop'
...
Fix Cache Control headers on media
See merge request pleroma/pleroma!2295
5 years ago
rinpatch
6a28c198af
uploaded media plug: do not inject compile-time params on every request
5 years ago
rinpatch
658f30c0b3
Merge branch 'static-accept-missing' into 'develop'
...
Fix static FE plug to handle missing Accept header.
See merge request pleroma/pleroma!2260
5 years ago
rinpatch
fc4496d4fa
rate limiter: disable based on if remote ip was found, not on if the plug 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
5 years ago
Mark Felder
3b1b183b42
Synchronize cache-control header for local media with the mediaproxy
5 years ago
Mark Felder
413177c8f0
Set correct Cache-Control header for local media
5 years ago
Ivan Tashkinov
5fc92deef3
[ #1560 ] Ensured authentication or enabled federation for federation-related routes. New tests + tests refactoring.
5 years ago
Ivan Tashkinov
027714b519
Merge remote-tracking branch 'remotes/origin/develop' into 1560-non-federating-instances-routes-restrictions
5 years ago
Ivan Tashkinov
40765875d4
[ #1560 ] Misc. improvements in ActivityPubController federation state restrictions.
5 years ago
Mark Felder
05da5f5cca
Update Copyrights
5 years ago
Ivan Tashkinov
b6fc98d9cd
[ #1560 ] ActivityPubController federation state restrictions adjustments. Adjusted tests.
5 years ago
Ivan Tashkinov
99a6c660a9
Merge remote-tracking branch 'remotes/origin/develop' into 1560-non-federating-instances-routes-restrictions
5 years ago
Haelwenn (lanodan) Monnier
6da6540036
Bump copyright years of files changed after 2020-01-07
...
Done via the following command:
git diff fcd5dd259a
--stat --name-only | xargs sed -i '/Pleroma Authors/c# Copyright © 2017-2020 Pleroma Authors <https:\/\/pleroma.social\/>'
5 years ago
Phil Hagelberg
523f73dccd
Fix static FE plug to handle missing Accept header.
5 years ago
rinpatch
4d416343fa
rate limiter: Fix a race condition
...
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.
5 years ago
Ivan Tashkinov
c747260989
[ #2250 ] Tiny refactoring per merge request review.
5 years ago
Ivan Tashkinov
3759b146c4
Apply suggestion to lib/pleroma/plugs/rate_limiter/rate_limiter.ex
5 years ago
Ivan Tashkinov
6f2efb1c45
Runtime configurability of RateLimiter. Refactoring. Disabled default rate limits in tests.
5 years ago
Ivan Tashkinov
0cf1d4fcd0
[ #1560 ] Restricted AP- & OStatus-related routes for non-federating instances.
5 years ago
lain
3eddd9caa6
Merge branch 'require-signature' into 'develop'
...
Add an option to require fetches to be signed
Closes #1444
See merge request pleroma/pleroma!2071
5 years ago
rinpatch
15ea75cd2a
Actually fix upload limit on OTP releases
...
Closes #1109
5 years ago
rinpatch
c27d1d65bf
Merge branch 'fix/disable-rate-limiter-for-socket-localhost' into 'develop'
...
Disable rate limiter for socket/localhost
Closes #1380
See merge request pleroma/pleroma!2064
5 years ago
rinpatch
5b62acf6e9
Merge branch 'develop' into fix/disable-rate-limiter-for-socket-localhost
5 years ago
lain
774cba84f5
Merge branch 'reenable-rate-limit-and-remote-ip' into 'develop'
...
Re-enable rate limiter and enable remote ip
See merge request pleroma/pleroma!2164
5 years ago
feld
36becd5573
Update http_security_plug.ex
5 years ago
rinpatch
889965141a
RemoteIp: only trust X-Forwarded-For
...
Our nginx config will happily pass `Forwarded`/`X-Real-IP` from the
client. Caddy, Apache and Varnish pass `X-Forwarded-For` as well anyway.
5 years ago
Egor Kislitsyn
e07e7888d7
Fix credo warning
5 years ago
Egor Kislitsyn
2bd4d6289b
Make the warning more scarier
5 years ago
Egor Kislitsyn
6302b40791
Warn if HTTPSecurityPlug is disabled
5 years ago
Maksim Pechnikov
108a39c876
updated error messages for authentication process
5 years ago
Ivan Tashkinov
39ce894a07
Merge remote-tracking branch 'remotes/origin/develop' into 1478-oauth-admin-scopes-tweaks
...
# Conflicts:
# lib/pleroma/user.ex
5 years ago
Ivan Tashkinov
6c94b7498b
[ #1478 ] OAuth admin tweaks: enforced OAuth admin scopes usage by default, migrated existing OAuth records. Adjusted tests.
5 years ago
Egor Kislitsyn
775212121c
Verify HTTP signatures only when request accepts "activity+json" type
5 years ago
Egor Kislitsyn
a12b6454bb
Add an option to require fetches to be signed
5 years ago
Ivan Tashkinov
7973cbdb9f
OAuthScopesPlug: disallowed nil token (unless with :fallback option). WIP: controller tests modification: OAuth scopes usage.
5 years ago
Maxim Filippov
eb11c60289
Disable rate limiter for socket/localhost (unless RemoteIp is enabled)
5 years ago
Ivan Tashkinov
3920244be5
[ #1427 ] Fixed `:admin` option handling in OAuthScopesPlug, added tests.
5 years ago
Ivan Tashkinov
835ac2157c
Merge remote-tracking branch 'remotes/upstream/develop' into 1427-oauth-admin-scopes
...
# Conflicts:
# CHANGELOG.md
5 years ago
rinpatch
3c45ed4f47
OTP: Fix runtime upload limit config being ignored
...
Closes #1109
5 years ago
Ivan Tashkinov
1770602747
[ #1427 ] Extra check that admin OAuth scope is used by admin. Adjusted tests.
5 years ago
Ivan Tashkinov
40e1817f70
[ #1427 ] Fixes / improvements of admin scopes support. Added tests.
5 years ago
Ivan Tashkinov
93a80ee915
[ #1427 ] Bugfix for `enforce_oauth_admin_scope_usage`. Admin API documentation entry.
5 years ago
Ivan Tashkinov
af42c00cff
[ #1427 ] Reworked admin scopes support.
...
Requalified users.is_admin flag as legacy accessor to admin actions in case token lacks admin scope(s).
5 years ago
Egor Kislitsyn
36686f5245
Support authentication via `x-admin-token` HTTP header
5 years ago
rinpatch
22554ac5ca
Merge branch 'bugfix/1395-email-activation' into 'develop'
...
Bugfix/1395 email activation
Closes #1395
See merge request pleroma/pleroma!1965
5 years ago
lain
f17e0f8e4f
OAuthPlug, Router: Handle deactivated users in the UserEnabledPlug
5 years ago
kaniini
2cc043591c
Merge branch 'feature/static-fe' into 'develop'
...
Static frontend
See merge request pleroma/pleroma!1917
5 years ago
Steven Fuchs
94627baa5c
New rate limiter
5 years ago
lain
f6056e9c9c
UserEnabledPlug: Don't authenticate unconfirmed users.
5 years ago
Phil Hagelberg
886a07ba57
Move static_fe config to its own section instead of in :instance.
5 years ago
Phil Hagelberg
8969c5522d
Make many of the improvements suggested in review.
5 years ago
Phil Hagelberg
e8bee35578
Static FE plug should only respond to text/html requests.
5 years ago
Phil Hagelberg
dc3b87d153
Move static FE routing into its own plug.
...
Previously it was piggybacking on FallbackRedirectController for users
and OStatusController for notices; now it's all in one place.
5 years ago
rinpatch
365657320c
Fix TrailingFormatPlug not being active for /api/oauth_tokens
5 years ago
Ivan Tashkinov
10ff01acd9
[ #1304 ] Moved all non-mutes / non-blocks fields from User.Info to User. WIP.
5 years ago
Ivan Tashkinov
64095961fe
[ #1234 ] Merge remote-tracking branch 'remotes/upstream/develop' into 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
5 years ago
minibikini
f9380289eb
Add `remote_ip` plug
5 years ago
Ivan Tashkinov
e4f3d7f69d
Apply suggestion to lib/pleroma/plugs/oauth_scopes_plug.ex
5 years ago
Ivan Tashkinov
01c1078015
[ #1234 ] Merge remote-tracking branch 'remotes/upstream/develop' into 1234-mastodon-2-4-3-oauth-scopes
...
# Conflicts:
# lib/pleroma/web/activity_pub/activity_pub_controller.ex
5 years ago
Ivan Tashkinov
efbc2edba1
[ #1234 ] Merge remote-tracking branch 'remotes/upstream/develop' into 1234-mastodon-2-4-3-oauth-scopes
...
# Conflicts:
# lib/pleroma/web/activity_pub/activity_pub_controller.ex
# lib/pleroma/web/router.ex
5 years ago
Ivan Tashkinov
e6f43a831b
[ #1234 ] Permissions-related fixes / new functionality (Masto 2.4.3 scopes).
5 years ago
rinpatch
b0e6058021
Parse http signature for request to objects/activities
5 years ago
rinpatch
dabc4a00f5
Put the cache with the right key when using a tracking function
5 years ago
rinpatch
769fb778d4
Track object/create activity fetches
5 years ago
minibikini
11e12b5761
Add Pleroma.Plugs.Cache
5 years ago
Ivan Tashkinov
b63faf9819
[ #1234 ] Mastodon 2.4.3 hierarchical scopes initial support (WIP).
5 years ago
rinpatch
3523bdcf26
Call TrailingFormatPlug for /api/pleroma/emoji
...
Apparently Pleroma-FE still calls it with trailing '.json'
5 years ago
rinpatch
cc1d1ee406
Mastdon API: Add ability to get a remote account by nickname to
...
`/api/v1/accounts/:id`
5 years ago
Maksim
55341ac717
tests WebFinger
5 years ago
kaniini
716afc83ce
Merge branch 'refactor/http-signature-plug' into 'develop'
...
http signature plug: separation of concerns
See merge request pleroma/pleroma!1449
5 years ago
Ariadne Conill
c947cfec5a
mapped signature plug: use `user` assign like authentication plug
5 years ago
Maksim
f435217e50
tests for Plugs.AuthenticationPlug
5 years ago
Ariadne Conill
a8af0ac053
mapped signature plug: fix user lookup
5 years ago
Ariadne Conill
5ea0cd69f7
mapped signature plug: don't invalidate in cases where a signature is actually not present (testsuite)
5 years ago
Ariadne Conill
184fa61fb3
plugs: add MappedSignatureToIdentityPlug
5 years ago
Ariadne Conill
88d064d80e
http signature plug: remove redundant checks handled by HTTPSignatures library
...
the redundant checks assumed a POST request, which will not work for signed GETs.
this check was originally needed because the HTTPSignatures adapter assumed that
the requests were also POST requests. but now, the adapter has been corrected.
5 years ago
Moonman
105f437ce9
formatting
5 years ago
Moonman
f98f7ad1b9
detect and use sha512-crypt for stored password hash.
5 years ago
Ivan Tashkinov
369e9bb42f
[ #1041 ] Rate-limited status actions (per user and per user+status).
5 years ago
Egor Kislitsyn
ed8ce21a22
Fix unused import warning
5 years ago
Egor Kislitsyn
a42da8f311
Fix response
5 years ago