summaryrefslogtreecommitdiff
path: root/snac.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2026-02-05strip_exif support for the OpenBSD sandboxGravatar Alvar Penning1-59/+99
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.Gravatar grunfink1-0/+1
2026-01-10New file xs_list_tools.h.Gravatar grunfink1-0/+1
2026-01-06Implement metadata stripping for uploaded videosGravatar Stefano Marinelli1-13/+99
- 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 mediaGravatar Stefano Marinelli1-0/+64
- 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.Gravatar grunfink1-1/+1
2025-10-13xs_http.h: new file.Gravatar grunfink1-20/+1
2025-05-04xs_webmention.h new file.Gravatar grunfink1-0/+1
2025-03-11Fixed typo.Gravatar default1-1/+1
2025-02-17Add fake HTTP status error 399 to http_status_text().Gravatar default1-0/+1
2025-02-14xs_po.h new file.Gravatar default1-0/+1
2025-02-14New function lang_str().Gravatar default1-0/+1
2025-02-09Fixed function tid() for some architectures.Gravatar default1-1/+1
2025-01-08Bumped copyright year.Gravatar default1-1/+1
2024-11-12The proxy token seed is created on startup and never stored.Gravatar default1-0/+1
2024-08-23Searches are now case-insensitive for all alphabets.Gravatar default1-0/+1
2024-08-05Added support for listening on unix sockets.Gravatar default1-0/+1
2024-05-27Translate status codes to canonical status textsGravatar Louis Brauer1-0/+12
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.Gravatar default1-1/+1
2023-11-20Replaced encode_html_strict() with xs_html_encode().Gravatar default1-0/+1
2023-11-17Backport from xs.Gravatar default1-0/+1
2023-10-17Added FastCGI support.Gravatar default1-0/+1
2023-10-13Don't allow creating users which user name strings only differ in case.Gravatar default1-0/+3
2023-09-27Some tweaks to the logging system.Gravatar default1-15/+13
2023-09-25Backport from xs.Gravatar default1-0/+1
2023-09-17Backport from xs.Gravatar default1-0/+1
2023-07-28Updated comment in headers.Gravatar default1-1/+1
2023-07-09Fixed failed mkdir() in restricted environments.Gravatar default1-2/+7
2023-06-15If a ~/log/ folder exists, also write the log there.Gravatar default1-2/+3
2023-06-11If ~/error/ exists, also log messages to a file there.Gravatar default1-0/+8
2023-06-05Replaced usage of random() with xs_rnd_buf().Gravatar default1-1/+4
2023-06-05Some prototype tweaks.Gravatar default1-8/+8
2023-06-05Moved srv_running variable to httpd.c.Gravatar default1-1/+0
2023-05-17Got rid of xs_encdec.h.Gravatar default1-1/+0
2023-05-09Backport from xs.Gravatar default1-1/+2
2023-04-16arc4random() does not exist in not-so-old systems, so revert this.Gravatar default1-1/+1
Revert "Replaced random() with arc4random()." This reverts commit f658f345cac7b24d6fa61f08b4ec09823d28b11a.
2023-04-16Replaced random() with arc4random().Gravatar default1-1/+1
2023-03-01Moved srv_archive() to data.c.Gravatar default1-94/+0
2023-02-07New utility function mkdirx().Gravatar default1-1/+13
2023-02-07Tweaked user and group permissions for new files and dirs.Gravatar default1-1/+1
2023-02-02Minor header tweaks.Gravatar default1-2/+4
2023-01-17Updated year in copyright notices.Gravatar default1-1/+1
2022-12-14Some code reordering to placate scan-build's wrath.Gravatar default1-7/+9
2022-12-04New function new_password().Gravatar default1-3/+3
2022-10-26Fixed a nasty macro expansion bug.Gravatar default1-0/+7
2022-10-15Don't set tz in gettimeofday() because nobody implements it any longer.Gravatar default1-2/+1
2022-10-03Backport from xs.Gravatar default1-0/+1
2022-10-02Use the time functions of xs_time.h.Gravatar default1-19/+2
2022-09-28New function ftime().Gravatar default1-0/+9
2022-09-28Got xs_set.h from xs.Gravatar default1-0/+1