aboutsummaryrefslogtreecommitdiff
path: root/data.c
AgeCommit message (Collapse)Author
2026-04-05Merge pull request 'static files: allow files in a subdirectory' (#541) from ↵grunfink
lbr/snac2:master into master Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/541
2026-04-03Really purge static directories.grunfink
2026-04-02Also exclude the favicon_url in server.json from user directories.grunfink
2026-04-02Only purge static directories if configured in server.json.grunfink
2026-04-02Also exclude emojis served from static directories.grunfink
2026-04-02Also exclude a user's style.css from purge_static().grunfink
2026-04-02New function purge_static() (still dummy).grunfink
2026-03-26Increased some debug level in error users.grunfink
These are very annoying in instances that don't have a prefix, as fuckers are trying PHP and other vulnerabilities non-stop.
2026-03-22Also purge the 'pending/' subdirectory.default
2026-03-19Implemented tootfinder.ch compatibility mimic Mastodon BehaviourGiuseppe Ranieri
Added aliases list on webfinger response Return the /users/<actor> in the webfinger response ( mimic Mastodon ) Implemented /users endpoint redirect to access actor profile Files changed: modified: data.c modified: httpd.c modified: snac.h modified: webfinger.c
2026-02-08data: use lstat() instead of stat()lbr
this disallows snac to serve a static file which is a symlink.
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-02Use the translated month names in date labels.grunfink
2026-02-02Added translatable month names.grunfink
2026-01-28data: fix checking for a file typela_ninpre
2026-01-28data: don't try to read something that's not a regular filela_ninpre
2026-01-28static files: allow files in a subdirectoryla_ninpre
allowing '/' in paths is a bit scary, but replacing the check with reject on '..' seems to work. please correct me if i'm wrong and this is insecure.
2026-01-25notifications filterbyte
2026-01-25fixing leak in reallocated stringbyte
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-12-18Fixed leak in emoji_reacted().grunfink
2025-12-18Fixed leak in timeline_admire().grunfink
2025-12-18Fixed some xs_dup() leaks.grunfink
2025-12-18Added emoji reactions (contributed by violette).violette
2025-11-30Fix user matchingrako
In order to be a proper prefix, the actor url must end with a '/' otherwise it can match another user that starts with the same prefix: for example 'testuser' will match anything made by 'testuser2'
2025-11-29Moved is_msg_mine() to data.c.grunfink
2025-10-24Keep track of deleted users and return 410 Gone for them.grunfink
2025-10-13xs_http.h: new file.grunfink
2025-09-28Merge pull request 'implementing scopes' (#474) from ↵grunfink
byte/snac2:feature/visibility into master Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/474
2025-09-28New function actor_failure() (again, but much better).grunfink
2025-09-28Revert "New function actor_failure()."grunfink
This reverts commit 335b90a9d1654aadb4e0d87114b82685defcd50b.
2025-09-28New function actor_failure().grunfink
2025-09-20implementing visibility scopesbyte
2025-09-13Set default max_failing_days to 15 days.grunfink
2025-09-13New configuration directive 'max_failing_days'.grunfink
2025-09-12Fixed bug in instance_failure() path.grunfink
2025-09-12New function instance_failure().grunfink
2025-09-07Always do a deferred fsck at startup.grunfink
2025-09-07Changed fsck debug level.grunfink
2025-09-07New command-line option 'fsck'.grunfink
2025-09-03Always add a user's posts to the public timeline, even if it's not really ↵grunfink
public.
2025-09-03Revert "Also keep a 'personal' folder for better organization."grunfink
This reverts commit 0c3665fc49064f1fd5a04f2427056f9ea37f8d70.
2025-09-03Also keep a 'personal' folder for better organization.grunfink
2025-09-03Renamed function list_content() to list_members().grunfink
2025-09-03New function enqueue_collect_outbox().grunfink
2025-08-18New function enqueue_collect_replies().grunfink
2025-08-12content_search() also looks in the attributedTo field.grunfink
2025-08-03New function unhide().grunfink
2025-07-30New server knob 'propagate_local_purge'.grunfink