aboutsummaryrefslogtreecommitdiff
path: root/snac.c
AgeCommit message (Collapse)Author
2026-02-05strip_exif support for the OpenBSD sandboxAlvar Penning
Change the strip_exif logic to work with the already existing OpenBSD sandbox and allow ffmpeg and mogrify to be executed. The previous strip_exif implementation relied on system(3), effectively starting "/bin/sh" and executing the required tool within a shell session. Making this work in the sandbox would require to allow executing "/bin/sh", rendering the sandbox useless. Thus, the code now starts determining the absolute path of the tools - unless they are given as ffmpeg_path or mogrify_path - and allowing them to be executed via unveil(2). Then, instead of the system(3) call, the good old fork(2) and execve(2) dance is performed. The sbox_enter code was made aware of strip_exif, which resulted in a pledge(2) violation before when disable_email_notifications was set to false. Furthermore, the detected paths of the tools are now allowed.
2026-02-02Added translatable month names.grunfink
2026-01-12Merge pull request 'Implement metadata stripping for uploaded photos and ↵grunfink
videos' (#515) from draga79/snac2:master into master Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/515
2026-01-10New file xs_list_tools.h.grunfink
2026-01-06Implement metadata stripping for uploaded videosStefano Marinelli
- Extend `strip_media` to support video files using `ffmpeg`. - Use `ffmpeg -map_metadata -1 -c copy` to strip global metadata. - Support formats: mp4, m4v, mov, webm, mkv, avi. - Add `ffmpeg_path` configuration option. - Implement robust relative path handling (`user/` heuristic) to support jailed environments. - Enforce strict checks on startup: fail if tools (mogrify/ffmpeg) are missing when enabled.
2026-01-06Implement configurable EXIF stripping for uploaded mediaStefano Marinelli
- Add `strip_exif` configuration option to enable metadata removal. - Add `mogrify_path` configuration to specify external tool location. - Implement strip_media using `mogrify -strip`. - Support multiple image formats: jpg, png, webp, heic, heif, avif, tiff, gif, bmp. - Add strict startup check: fail to start if `strip_exif` is enabled but `mogrify` is missing/broken. - Update documentation in `doc/snac.8`.
2026-01-01Bumped copyright year.grunfink
2025-10-13xs_http.h: new file.grunfink
2025-05-04xs_webmention.h new file.grunfink
2025-03-11Fixed typo.default
2025-02-17Add fake HTTP status error 399 to http_status_text().default
2025-02-14xs_po.h new file.default
2025-02-14New function lang_str().default
2025-02-09Fixed function tid() for some architectures.default
2025-01-08Bumped copyright year.default
2024-11-12The proxy token seed is created on startup and never stored.default
2024-08-23Searches are now case-insensitive for all alphabets.default
2024-08-05Added support for listening on unix sockets.default
2024-05-27Translate status codes to canonical status textsLouis Brauer
Use those in HTTP responses instead of "OK"/"ERROR". Apps like Tokodon show only the status text in unexpected responses.
2024-01-04Updated copyright year.default
2023-11-20Replaced encode_html_strict() with xs_html_encode().default
2023-11-17Backport from xs.default
2023-10-17Added FastCGI support.default
2023-10-13Don't allow creating users which user name strings only differ in case.default
2023-09-27Some tweaks to the logging system.default
2023-09-25Backport from xs.default
2023-09-17Backport from xs.default
2023-07-28Updated comment in headers.default
2023-07-09Fixed failed mkdir() in restricted environments.default
2023-06-15If a ~/log/ folder exists, also write the log there.default
2023-06-11If ~/error/ exists, also log messages to a file there.default
2023-06-05Replaced usage of random() with xs_rnd_buf().default
2023-06-05Some prototype tweaks.default
2023-06-05Moved srv_running variable to httpd.c.default
2023-05-17Got rid of xs_encdec.h.default
2023-05-09Backport from xs.default
2023-04-16arc4random() does not exist in not-so-old systems, so revert this.default
Revert "Replaced random() with arc4random()." This reverts commit f658f345cac7b24d6fa61f08b4ec09823d28b11a.
2023-04-16Replaced random() with arc4random().default
2023-03-01Moved srv_archive() to data.c.default
2023-02-07New utility function mkdirx().default
2023-02-07Tweaked user and group permissions for new files and dirs.default
2023-02-02Minor header tweaks.default
2023-01-17Updated year in copyright notices.default
2022-12-14Some code reordering to placate scan-build's wrath.default
2022-12-04New function new_password().default
2022-10-26Fixed a nasty macro expansion bug.default
2022-10-15Don't set tz in gettimeofday() because nobody implements it any longer.default
2022-10-03Backport from xs.default
2022-10-02Use the time functions of xs_time.h.default
2022-09-28New function ftime().default