0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-07 13:19:19 +08:00
discourse/lib/freedom_patches
David Taylor c0c17225e9
DEV: Sandbox all image processing via Landlock [backport 2026.1] (#42065)
Backport of #42048 to release/2026.1.

---

- 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 introduces the landlock 0.3 gem and `Discourse::SafeExec` (from
#42049), which this branch lacked and 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:13 +01:00
..
active_record_attribute_methods.rb
active_record_disable_serialization.rb DEV: Remove unnecessary freedom patches 2024-08-19 12:06:54 +02:00
ams_include_without_root.rb
copy_file.rb
cose_rsapkcs1.rb
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.1] (#42065) 2026-07-27 18:54:13 +01:00
inflector_backport.rb
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: Add a user agent to all HTTP requests that Discourse makes. (#31555) 2025-03-03 16:32:25 +11:00
propshaft_patches.rb DEV: ensure retries do not re-set attempts=0 (#33365) 2025-06-27 06:51:10 -03:00
rails_multisite.rb PERF: Don't do initialization for every DB if RAILS_DB is set (#28668) 2024-09-03 15:56:46 +10:00
request_server_session.rb DEV: Rename SecureSession to ServerSession 2025-09-18 16:31:03 +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
safe_migrations.rb
schema_migration_details.rb
translate_accelerator.rb DEV: Remove unnecessary freedom patches 2024-08-19 12:06:54 +02:00
web_push_request.rb