Commit Graph
10 Commits
Author SHA1 Message Date
RushLana 2357a86d51 Fixes #2552 - Implement SVG validation
Use https://github.com/darylldoyle/svg-sanitizer to check for malicious code inside svg, throw an error code 415 when triggered in the API.
2026-05-26 14:26:39 +02:00
RushLana 001a21056c fixes #2540 only prompt to update container on version lower than the latest version 2026-03-16 13:03:45 +01:00
RushLana bfbc8f68d9 Add docker updates support
Detect if running in a official container and replace updates buttons by links to the documentation
2026-02-24 15:16:56 +01:00
RushLana 5563ea98fd Add a more granular container detection (#2501)
Add a more granular container detection

Replace is_in_container by  get_container_info
Currently detect Official container (once they update a version with a tagfile) and LinuxServer container
All other container are marked as Unknown

Report two field :
- container_type ( none | Official | LinuxServer | Unknown
- container_version ( build Version number like 16.2.0a, only reported if Official container is detected )
2026-01-14 13:00:14 +01:00
RushLana ff633b7137 Change syntax order of all imagemagick to match IM7 syntax 2025-12-29 15:49:31 +01:00
RushLana 57f725d8e6 Fix is_in_container not respecting open_basedir permission
If the user as added open_basedir restriction the function will fail with a Warning :
Warning: file_exists(): open_basedir restriction in effect. File(/proc/2/sched) is not within the allowed path(s)

This fix add a check that assume piwigo is not in a container when open_basedir is set
2025-12-08 11:26:50 +01:00
Renarde-dev 21e77002bc Detect if piwigo is running in a container
Append info on PHP_OS in the template of `admin/maintenance_env.php` and in `include/functions.inc.php` -> `send_piwigo_infos()`

Detection works by checking if PHP is running on Linux then check if PID2 is kthreadd
Kthreadd is useless in a container so PID2 should not exist of be another process
If unable to read /proc/2/sched for some reason, assume a SELinux restriction and that PHP is not running in a container

`is_in_container()` doesn't differentiate between VMs or bare metal, it only check if PHP is running in a containerized environement via tools like docker or podman
2025-09-05 13:32:34 +02:00
RushLana c616f17145 Fix webp animation derivatives
Using imagick to generate derivates on an animated webp break animation
Applying "-layers coalesce" ensure the animation remain smooth
Refs :
- https://github.com/ImageMagick/ImageMagick/issues/6375
- https://github.com/ImageMagick/ImageMagick/issues/5542
- https://github.com/ImageMagick/ImageMagick/issues/4246
2025-08-12 17:06:26 +02:00
RushLana 3293b329e9 Implement imagick command fix
`pwg_image::get_ext_imagick_command()` get the imagick command (convert or magick)
replace all convert with pwg_image::get_ext_imagick_command()
2025-08-12 17:06:26 +02:00
RushLana 66df209632 Change graphic library priority, ext_imagemick is now preffered 2025-08-12 17:06:26 +02:00