0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/lib/freedom_patches
David Taylor 4d730e9e5d
DEV: Sandbox all image processing via Landlock [backport 2026.5] (#42064)
Backport of #42048 to release/2026.5.

---

- Update all imagemagick calls to go through a new `::Imagemagick`
wrapper, which wraps the command in `Discourse::SafeExec`
- Patch image_optim to force its calls through `SafeExec`

This provides robust defense-in-depth against vulnerabilities in image
processing binaries

Also bumps landlock to 0.3 (making it unconditional in the Gemfile) and
brings in the latest `Discourse::SafeExec` (from #42049), which this
change depends on. Landlock is supported on Linux kernel 5.13 and above.

The `topic_og_image_generator.rb` change is omitted; that file does not
exist on this branch.
2026-07-27 18:54:19 +01:00
..
active_record_attribute_methods.rb DEV: Clean up freedom patches 2022-04-06 10:07:14 +02:00
active_record_disable_serialization.rb DEV: Remove unnecessary freedom patches 2024-08-19 12:06:54 +02:00
ams_include_without_root.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
copy_file.rb DEV: Work around a Docker issue (#13368) 2021-06-14 17:38:36 +02:00
cose_rsapkcs1.rb DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
fast_image.rb SECURITY: Add FastImage SSRF safe freedom patch 2024-07-03 20:49:15 +08:00
image_optim_sandbox.rb DEV: Sandbox all image processing via Landlock [backport 2026.5] (#42064) 2026-07-27 18:54:19 +01:00
inflector_backport.rb DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
ip_addr.rb DEV: Fix various rubocop lints (#24749) 2023-12-06 23:25:00 +01:00
message_pack_extensions.rb DEV: Serialize cookies using MessagePack (#35082) 2025-10-03 11:40:49 +02:00
net_http.rb FIX: Set sane default for Net::HTTP when processing a request (#28141) 2024-08-06 07:12:42 +08:00
net_http_header.rb DEV: Enable some minor rubocop rules (#40094) 2026-05-19 15:29:38 +02:00
pitchfork_sock_stream.rb DEV: Suppress Pitchfork's "Unexpected message in sig_queue" (#39985) 2026-05-13 18:37:09 +02:00
propshaft_patches.rb FIX: Raise error after exhausting retries in development asset lookup (#39935) 2026-05-13 10:06:49 +01:00
rails_multisite.rb DEV: Enable Style/RedundantBegin rubocop rule (#40096) 2026-05-19 18:44:54 +02:00
request_server_session.rb DEV: Enable Style/RedundantParentheses rubocop rule (#40095) 2026-05-19 15:48:09 +02:00
rspec_mocks_from_described_class.rb DEV: Monkey patch a from_described_class helper in RSpec::Mocks (#34021) 2025-08-05 12:03:42 +10:00
safe_buffer.rb DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
safe_migrations.rb DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
schema_migration_details.rb DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
translate_accelerator.rb DEV: Enable Style/RedundantBegin rubocop rule (#40096) 2026-05-19 18:44:54 +02:00
web_push_request.rb SECURITY: Monkey-patch web-push gem to use safer HTTP client 2023-03-16 15:27:09 -06:00