Commit graph

165 commits

Author SHA1 Message Date
Henry Jameson
31115e24c0 Merge remote-tracking branch 'origin/develop' into shigusegubu
* origin/develop: (294 commits)
  Fix incorrect fallback when English is set to first language
  Fix eratic test for POST /api/pleroma/admin/reports/:id/notes
  After code review
  Support fallbacking to other languages
  Delete report notifs when demoting from superuser
  Update Caddyfile to Caddy v2
  Lint
  Support multiple locales from userLanguage cookie
  Support multiple locales formally
  Make lint happy
  Add test for fallbacking to a general language
  Fallback to a variant if the language in general is not supported
  Add changelog
  Document API addition
  Allow user to register with custom language
  Allow update_credentials to update User.language
  Send emails i18n'd using backend-stored user language
  Make all emails translatable
  Fix digest test
  Make mail and mailer translatable
  ...
2022-04-19 14:27:21 +03:00
sleepycrow
9b69ccb35b Update Caddyfile to Caddy v2 2022-03-06 14:24:32 +01:00
Sean King
08694599ae
Remove bash script for downloading new MastoFE build 2021-04-15 23:41:34 -06:00
Henry Jameson
e7aebdf7b6 Merge remote-tracking branch 'origin/develop' into shigusegubu
* origin/develop: (185 commits)
  OAuthScopesPlug: remove transform_scopes in favor of explicit admin scope definitions
  OpenAPI: Add `admin:` scope prefix to admin operations
  Remove `:auth, :enforce_oauth_admin_scope_usage`
  Do not want these interfering with develop builds
  Make it possible to generate custom docker images by prefixing the branch name with "build-docker"
  Chats: Introduce /api/v2/pleroma/chats which implements pagination
  ChatMessage schema: Add `unread` property
  Relicense documentation under CC-BY-4.0
  Add API endpoint to remove a conversation
  update changelog to mention change of avatar
  replace avi.png
  Add myself to .mailmap
  [#2053] Changed `Notification/for_user_query/2` to use join to filter out inactive actors instead of subselect of _all_ inactive AP ids from `users`.
  [#2510] Improved support for app-bound OAuth tokens. Auth-related refactoring.
  not used mock
  OpenAPI spec: Do not show build enviroment in the spec version
  OpenAPI spec task: Load pleroma application to get version info
  Lint
  Revert "Add plaintext support for all emails except the digest"
  MRF NoEmptyPolicy: Deny posts from local users if there is no content or only mentions.
  ...
2021-02-20 20:47:18 +02:00
Mark Felder
1d8f1fe077 Add a default rule to not attempt to cache any files larger than 50MB
This fixes connection failures when trying to retrieve large files.
It is less common in typical Pleroma usage, but it's possible to encounter
this on a cloud instance with lower memory.
2021-02-05 13:35:51 -06:00
Mark Felder
c6ef87d585 Note the requirement for the url_format parameter 2021-01-25 18:20:07 -06:00
Mark Felder
8373cb645b Add sudo rule, remove quoting that breaks the for loop 2021-01-25 18:15:04 -06:00
Mark Felder
003402df40 Add ability to invalidate cache entries for Apache 2021-01-21 14:20:13 -06:00
Mark Felder
3078e62488 Update Apache configuration. This has been tested. 2021-01-21 12:25:18 -06:00
Henry Jameson
697397e2b8 Merge remote-tracking branch 'origin/develop' into shigusegubu
* origin/develop: (145 commits)
  CHANGELOG.md: Remove wrong entries from Unreleased(patch)
  Only run one attachment cleanup job per node
  Just validate command is in PATH; forking a shell is wasteful
  Linting.
  Pbkdf2: Use it everywhere.
  Password -> Password.Pbkdf2
  Linting
  Password: Replace Pbkdf2 with Password.
  Password: Add password module
  COPYING: Bump copyright to 2021
  Bump Copyright to 2021
  Pagination: Don't be dos'd by random parameters.
  Simplify. We will always have a result from Upload.base_url/0, so just add it to the list
  Fix regression in MediaProxy.local?/0 and appending the Upload.base_url to whitelisted domains
  ChatMessages: Fix pagination headers.
  Formatting
  .formatter.exs: Format optional migrations
  Add development section
  Apply 4 suggestion(s) to 2 file(s)
  Move construction of S3 base URL with optional namespace and bucket to Upload.base_url/0
  ...
2021-01-18 04:04:27 +02:00
Haelwenn (lanodan) Monnier
c4439c630f
Bump Copyright to 2021
grep -rl '# Copyright © .* Pleroma' * | xargs sed -i 's;Copyright © .* Pleroma .*;Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>;'
2021-01-13 07:49:50 +01:00
Henry Jameson
d5afe8a884 Merge remote-tracking branch 'origin/develop' into shigusegubu
* origin/develop: (330 commits)
  Translated using Weblate (Chinese (Simplified))
  Minor refactoring of the logic for hiding followers/following counts.
  changelog
  Fix for dropping posts/notifs in WS when mix task is executed
  Fixed Rich Media Previews
  Majic: specify commit so source users do not get surprise updates
  Switch to a fork of Hackney 1.15.2 for now so we can have our URL normalization bugfix
  instance.gen: Warn that stripping exif requires exiftool
  instance.gen task: Only show files which will be actually overwritten
  Translated using Weblate (Ukrainian)
  Added translation using Weblate (Ukrainian)
  Tweaks to OAuth entities expiration: changed default to 30 days, removed hardcoded values usage, fixed OAuthView (expires_in).
  Changed default OAuth token expiration time to 30 days.
  [#3112] .gitattributes fix.
  Update CHANGELOG
  ApplicationRequirements: Add test, more text for pool size.
  Apply 1 suggestion(s) to 1 file(s)
  Add a startup error for modified Repo pool_size
  instance.reachable?: Limit to binary input
  instance: Do not fetch unreachable instances
  ...
2020-12-17 11:27:54 +02:00
Haelwenn (lanodan) Monnier
5c75bfc586
download-mastofe-build.sh: Proper exit when artifact is missing 2020-12-15 16:31:23 +01:00
rinpatch
2c55f7d7cb Remove FedSockets
Current FedSocket implementation has a bunch of problems. It doesn't
have proper error handling (in case of an error the server just doesn't
respond until the connection is closed, while the client doesn't match
any error messages and just assumes there has been an error after 15s)
and the code is full of bad descisions (see: fetch registry which uses
uuids for no reason and waits for a response by recursively querying a
 ets table until the value changes, or double JSON encoding).

Sometime ago I almost completed rewriting fedsockets from scrach to
adress these issues. However, while doing so, I realized that fedsockets
 are just too overkill for what they were trying to accomplish, which is
 reduce the overhead of federation by not signing every message.
This could be done without reimplementing failure states and endpoint
 logic we already have with HTTP by, for example, using TLS cert auth,
or switching to a more performant signature algorithm. I opened
https://git.pleroma.social/pleroma/pleroma/-/issues/2262 for further
discussion on alternatives to fedsockets.

From discussions I had with other Pleroma developers it seems like they
 would approve the descision to remove them as well,
therefore I am submitting this patch.
2020-11-17 17:28:30 +03:00
rinpatch
cc45c69fff Remove release_env
While taking a final look at instance.gen before releasing I noticed
that the release_env task outputs messages in broken english. Upon
further inspection it seems to have even more severe issues which, in
my opinion, warrant it's at least temporary removal:
- We do not explain what it actually does, anywhere. Neither the task
 docs nor instance.gen, nor installation instructions.
- It does not respect FHS on OTP releases (uses /opt/pleroma/config even
 though we store the config in /etc/pleroma/config.exs).
- It doesn't work on OTP releases, which is the main reason it exists.
Neither systemd nor openrc service files for OTP include it.
- It is not mentioned in install guides other than the ones for Debian
and OTP releases.
2020-11-08 11:56:09 +03:00
Henry Jameson
1f3c8cf707 Merge remote-tracking branch 'origin/develop' into shigusegubu
* origin/develop: (162 commits)
  Improve Keyword descriptions for AdminFE
  Fixed User.is_discoverable attribute rendering in Admin API User view.
  @doc fix.
  FrontStatic plug: excluded invalid url
  phoenix_controller_render_duration is no longer available in telemetry of Phoenix 1.5+
  ActivityPub: Add back debug call + explanation.
  clients.md: Add AndStatus, note supported protocols
  Fix link reference
  NoNewPrivileges breaks ability to send email via sendmail because it restricts ability to run setuid/setgid binaries
  Changelog: Add info about whitespace name remote users.
  User: Correctly handle whitespace names.
  Translated using Weblate (Chinese (Simplified))
  [#3059] Used forked prometheus-phx to remove log spam.
  [#3059] Formatting fix.
  [#3059] Fixed Phoenix 1.5 telemetry processing.
  Changelog: Add information about self-chats
  SideEffects: Correctly handle chat messages sent to yourself
  fix module name
  update changelog
  update docs
  ...
2020-10-30 02:04:07 +02:00
Mark Felder
e7b0840b88 NoNewPrivileges breaks ability to send email via sendmail because it restricts ability to run setuid/setgid binaries 2020-10-23 15:32:32 -05:00
Maksim Pechnikov
14054cd004 update task messages 2020-10-15 22:28:49 +03:00
Maksim Pechnikov
20e68b30f0 added generated pleroma.env 2020-10-15 22:28:26 +03:00
Henry Jameson
5f23876552 Merge remote-tracking branch 'origin/develop' into shigusegubu
* origin/develop: (180 commits)
  Deep link to the user account in AdminFE in account confirmation emails
  Spelling
  Ask user to use matching values for database setup
  Syntax error
  Don't always need to drop
  Improve backup/restore documentation
  Lint
  Apply 1 suggestion(s) to 1 file(s)
  Apply 1 suggestion(s) to 1 file(s)
  Apply 2 suggestion(s) to 2 file(s)
  Improve description yet again
  Don't leak internal variables in the docs. They're useless to users.
  Credo
  Improve descriptions for reserved and proxies
  Add test for an entry without CIDR format
  Move hardcoded default configuration into config.exs
  Fix docs for default headers used by RemoteIp. We only use X-Forwarded-For by default.
  Document the NSFW link preview change
  Add helper function to convert single IPs into CIDR format if they were not provided that way
  Docs: Modify docs so the postgres config is harder to get wrong.
  ...
2020-10-11 21:13:29 +03:00
Mark Felder
b3015db841 Syntax error 2020-09-30 12:49:51 -05:00
Mark Felder
49229107e8 Make it possible for Varnish logs to contain the true scheme used by clients
instead of always reporting http://
2020-09-30 12:32:54 -05:00
Mark Felder
8906f30ba1 Use an upstream for reverse proxy so future modifications are simplified 2020-09-21 16:19:08 -05:00
Mark Felder
ade7fede71 Most proxy settings can be global 2020-09-21 16:13:45 -05:00
Mark Felder
2b553b8f8e Remove duplicate setting 2020-09-21 16:11:01 -05:00
Mark Felder
75f6e5e8b7 Add FedSockets config 2020-09-21 16:10:31 -05:00
Henry Jameson
4174bc6126 Merge remote-tracking branch 'origin/develop' into shigusegubu
* origin/develop: (566 commits)
  Fix MRF reject for ChatMessage
  Create MRF.filter_pipeline to inject :object_data when present
  KeywordPolicy: Still match when fields are absent
  pleroma-fe bundle: bump to b225c3578f3c89af5ed3a0be3f8f3a6bbcedcc7d
  CHANGELOG.md: Add 2.1.2 entry
  mix.exs: bump version to 2.1.2
  Merge branch '2130-mfa-users-oauth-login-fix' into 'develop'
  Merge branch 'fix/streaming-termination-errors' into 'develop'
  Merge branch 'fix/mrf-simple-welcome-chats' into 'develop'
  Merge branch 'reply-visibility-user-guard' into 'develop'
  Merge branch 'bugfix/mrf-ingestion' into 'develop'
  adapt to new user factory behavior
  add test and changelog entry
  User search respect discoverable flag
  Merge branch 'hotfix/rich-media-compile-error' into 'develop'
  Merge branch 'feat/rich-media-head' into 'develop'
  Deny ConfigDB migration when deprecated settings found
  RichMedia: Fix log spam on failures and resetting TTL on cached errors
  Return the file content for `GET /api/pleroma/admin/instance_document/:document_name`
  add description to changelog
  ...
2020-09-17 23:40:53 +03:00
Mark Felder
dfcb1401c7 Improve FreeBSD rc script
Passes rclint now, $HOME is dynamic, and properly matches process name for signalling shutdown.
2020-08-18 10:24:34 -05:00
Farhan Khan
07376bd21a Adding installation documentation for FreeBSD + rc.d script 2020-08-13 18:59:13 -04:00
lain
5c4548d5e7 Revert "Merge branch 'issue/1023' into 'develop'"
This reverts merge request !2763
2020-08-10 13:05:13 +00:00
Henry Jameson
605d542a7c Merge remote-tracking branch 'origin/develop' into shigusegubu
* origin/develop: (67 commits)
  Fix example json response
  ChatMessage schema: Add preview cards.
  ChatMessageReferenceView: Display preview cards.
  OTP users need Pleroma running to execute pleroma_ctl, so reorganize instructions.
  Attempt to fix markdown formatting
  Apply 1 suggestion(s) to 1 file(s)
  set versions
  updated `cors_plug`
  set `postgrex` version
  set `web_push_encryption` version
  updated `calendar` package
  Expose seconds_valid in Pleroma Captcha API endpoint
  :show_reactions, refactor the other test
  :show_reactions, add CHANGELOG.md, refactor test
  feed/user_controller: Return 404 when the user is remote
  AccountController: Don't explicitly ask to keep users unconfirmed.
  EnsureRePrepended: Don't break on chat messages.
  update mogrify package
  set http_signatures version
  set `jason` version
  ...
2020-07-31 11:31:21 +03:00
Maksim Pechnikov
4e0e19a706 update task messages 2020-07-16 08:52:14 +03:00
Maksim Pechnikov
3062f86613 added generated pleroma.env 2020-07-14 09:05:34 +03:00
Henry Jameson
593edd3c41 Merge remote-tracking branch 'origin/develop' into shigusegubu
* origin/develop: (53 commits)
  Add warning against parsing/reusing MastoFE settings blob
  Update NotificationOperation spec
  Add `is_muted` to notifications
  Translated using Weblate (Italian)
  Added translation using Weblate (Italian)
  Add include for the "Further reading" section
  HellthreadPolicy: Restrict to Notes and Articles.
  Apply suggestion to lib/pleroma/web/api_spec/operations/pleroma_emoji_pack_operation.ex
  proper error codes for error in adminFE
  Apply suggestion to lib/pleroma/web/api_spec/operations/pleroma_emoji_pack_operation.ex
  cheatsheet.md: no_attachment_links → attachment_links
  fix for packs pagination
  Stop filling conversation field on incoming objects (legacy, unused)
  Only accounts with Service actor_type are considered as bots
  Add support for bot field in update_credentials
  README: Add some troubleshooting info for compilation issues.
  [#1873] Fixes missing :offset pagination param support. Added pagination support for hashtags search.
  default page size for files
  changelog entry
  adding overall count for packs and files
  ...
2020-06-23 01:35:40 +03:00
Henry Jameson
ce6f690a85 Merge remote-tracking branch 'origin/develop' into shigusegubu
* origin/develop: (276 commits)
  Remove `poll` from `notification_type` OpenAPI spec
  credo fix
  CHANGELOG.md: mention minimal elixir version update
  Update OTP releases to official images of 1.10.3
  Chunk the notification type backfill migration
  moving custom ecto types in context folders
  Upgrade to Elixir 1.9
  naming
  fix attemps to merge map
  fix for updated hackney
  Mogrify args as custom tuples
  Fix tests
  Changelog: Add info about conversation view changes.
  Conversations: Return last dm for conversation, not last message.
  Mastodon API: ensure the notification endpoint doesn't return less than the requested amount of records unless it's the last page
  ControllerHelper: Always return id field.
  Apply suggestion to lib/pleroma/web/controller_helper.ex
  Remove use of atoms in MRF.UserAllowListPolicy
  Fix atom leak in Rich Media Parser
  Return an empty map from Pleroma.Web.RichMedia.Parsers.OGP.parse/2
  ...
2020-06-19 15:17:00 +03:00
Maksim Pechnikov
579763126f Merge branch 'develop' into issue/1855 2020-06-15 15:24:55 +03:00
Maksim Pechnikov
2e8a236cef fix invalidates media url's 2020-06-14 21:02:57 +03:00
normandy
122328b93a Update pleroma.nginx to support TLSv1.3
Based on SSL config from https://ssl-config.mozilla.org/
2020-06-12 02:05:49 -04:00
Henry Jameson
f9b13c754c Merge remote-tracking branch 'origin/develop' into shigusegubu
* origin/develop: (269 commits)
  Apply suggestion to docs/administration/CLI_tasks/user.md
  rename mix task: `pleroma.user unsubscribe` -> `pleroma.user deactivate`
  Added the ability to upload background, logo, default user avatar, instance thumbnail, and the NSFW hiding image via AdminFE
  fixed `mix pleroma.instance gen`
  Also add new sidebarRight setting
  Add `background_image` to `InstanceOperation`
  Move notification actions to PleromaAPI.NotificationController
  Move conversation actions to PleromaAPI.ConversationController
  Move reaction actions to EmojiReactionController
  Add OpenAPI spec for PleromaAPI.PleromaAPIController
  Changelog: Add background to instance
  Docs: Add background_image in instance
  InstanceOperation: Add background image to example
  MastoFE: update to bundle-2020-05-20
  Apply suggestion to installation/nginx-cache-purge.sh.example
  update purge script
  Synchronize :fe settings in config.exs
  Fix summary
  User.Query: Remove superfluous `distinct`
  UserTest: Hide warning in tests.
  ...
2020-05-22 00:29:15 +03:00
Maksim
376147fb82 Apply suggestion to installation/nginx-cache-purge.sh.example 2020-05-20 04:12:21 +00:00
Maksim Pechnikov
b5b9d161cd update purge script 2020-05-20 06:56:04 +03:00
Maksim Pechnikov
3f8d68bdf3 added example cache purge script 2020-05-17 05:56:20 +03:00
lain
a2a8c8e9e0 Merge branch 'features/openrc-console' into 'develop'
init.d/pleroma: Add option to attach an elixir console

See merge request pleroma/pleroma!1704
2020-05-14 09:27:33 +00:00
Alexander Strizhakov
3c42caa85c
apache chain issue fix 2020-05-06 16:20:47 +03:00
Henry Jameson
5ca35e1251 Merge remote-tracking branch 'origin/develop' into shigusegubu
* origin/develop: (249 commits)
  Add a test for accounts/update_credentials
  Fix activity deletion
  Add emoji support in statuses in staticfe
  AccountView: fix for other forms of <br> in bio
  Mastodon API Account view: Remove an outdated hack
  Improved in-test `clear_config/n` applicability (setup / setup_all / in-test usage).
  restrict_unauthenticated setting
  include_types parameter in /api/v1/notifications
  remove federated testing
  Improved in-test config management functions.
  Fix ssl option on Ecto config breaking release
  Admin API: `PATCH /api/pleroma/admin/users/:nickname/credentials`, `GET /api/pleroma/admin/users/:nickname/credentials`.
  Admin API: `PATCH /api/pleroma/admin/users/:nickname/change_password`
  removing with_move parameter
  Improve documentation of mrf_object_age
  gitlab: create templates for bug reports and release MRs
  warnings fix
  removing from descriptions.exs deprecated settings
  fix for content-type header for tag feed
  adding rss for user feed
  ...
2020-03-25 17:37:53 +02:00
Mark Felder
e04e16bbc0 Do not strip Cache-Control headers from media. Trust the Pleroma backend. 2020-03-13 11:31:55 -05:00
Mark Felder
05da5f5cca Update Copyrights 2020-03-03 16:44:49 -06:00
Haelwenn (lanodan) Monnier
effb4a3d48
init.d/pleroma: Add option to attach an elixir console 2020-02-20 21:24:24 +01:00
Henry Jameson
830e18a702 Merge remote-tracking branch 'origin/develop' into shigusegubu
* origin/develop: (734 commits)
  update fast sanitize dependency
  streamer: use direct object for filter checks when there is no valid child object in an activity
  Bump fast_sanitize version
  Fix moderation log crash
  Undo dialyzer fix
  Fix count
  AdminAPI: Omit relay user from users list
  Fix "the call ... will never return" warning
  Bump fast_sanitize dependency so this builds on more than just Linux
  Remove following column from the migrations
  Update test for get_recipients_from_activity
  Fix bookmark migration using a query with a schema
  Add a migration to fix blocked follows
  Fix duplicate recipients
  Rip out the rest of htmlsanitizeex
  Remove commented-out code
  Fix XSS emoji test
  Bump fast_sanitize dependency
  Fix two migrations sharing the same module name
  Migrate missing follow requests
  ...
2019-11-04 11:43:40 +02:00
minibikini
f9380289eb Add remote_ip plug 2019-09-27 21:59:23 +00:00