Commit Graph

2399 Commits

Author SHA1 Message Date
plegall
da2804db72 next release will be 16.0.0RC3 2025-11-18 11:07:49 +01:00
Linty
e0a2a0ba2b fixes #2449 enhance password reset flow with verification and lockout
Added email notification for successful password reset, improved verification code handling, and implemented account lockout after too many failed attempts. Introduced new language strings for user feedback and security messages. Refactored password reset logic to better handle guest/generic users and API key recommendations.
2025-11-17 21:43:14 +01:00
HWFord
c04374928a issue #2439 update popin
Add translations
remove last major update conf when in piwigo Upgrade
don't send popin template if not needed
2025-11-17 10:00:53 +01:00
Linty
c43c3696e0 issue #2440 clear fake user cache on successful login
Added a call to clear_fake_user_cache() in pwg_login to ensure the fake user cache is reset after a successful login. Also introduced the clear_fake_user_cache() function for this purpose.
2025-11-13 15:44:00 +01:00
Linty
0f494baa0c fixes #2440 enhance login security and user activity display
Improves login security by:
- implementing constant-time authentication to reduce timing attacks
- refactoring user lookup into find_user_by_username_or_email() for username or email login
- introducing a fake user to keep password verification time consistent
- adding a finalize_login hook so plugins can control the authentication flow (2FA, rate limiting, etc.)

Also updates user activity JS to:
- better display action details
- properly handle user lists (login/logout with multiple users)
2025-11-13 14:05:35 +01:00
Linty
c257866d71 fixes #2436 refactor async upload authentication
Replaces direct login check with ws_session_login for 'pwg.images.uploadAsync' and updates error handling to return the login response. Also updates the web service method definition to make username and password optional and clarifies admin credential requirements in the documentation.
2025-11-13 13:04:22 +01:00
plegall
e07ca962f0 fixes #2434 always redirect server-side, not browser-side"
... this will avoid to try loading theme templates (with unset variables)
2025-11-11 18:51:32 +01:00
plegall
1d1a8b15da next release will be 16.0.0RC2 2025-11-10 17:42:30 +01:00
plegall
eb37a4e5f1 fixes #2423, fixes #1949, fixes #2401 render title/description and keep HTML in descriptions
... and in several API methods add new output fields name_raw and comment_raw that are ready for edition
2025-11-10 17:00:58 +01:00
Eric Quinton
be85e9381a Update functions_html.inc.php
replace "count xx != 0 by !empty, to support PHP 8.2 and after
2025-11-10 12:25:31 +01:00
plegall
a04c93cf76 fixes #2092 redesigned handling of return to gallery after photo edit
* instead of using the provided cat_id in the URL parameters, registers the "context" of the last 10 photos viewed. Be it an album, a search, a tag...
* maybe not the cleanest way to do it (because we do not rebuild the url string) but simple and straightforward
2025-11-03 21:49:23 +01:00
Linty
d600b019a6 enable qrcode generation for totp secrets
Uncommented and activated QR code generation in getQrCode(), allowing TOTP secrets to be encoded as base64 PNG images for easier setup in authenticator apps.
2025-10-29 12:23:54 +01:00
Linty
99bb370b98 fixes #2425 unescape API key name before returning
Added a call to stripslashes for the 'apikey_name' field to ensure it is unescaped before being returned. This improves display consistency for API key names containing escaped characters.
2025-10-29 12:03:43 +01:00
Linty
d6a1cf0466 fixes #2424 remove connection by header from API key validation
Simplifies the API key validation in auth_key_login by removing the requirement for connection_by_header. Now, API keys matching the pattern are accepted regardless of the connection source.
2025-10-29 11:49:19 +01:00
plegall
b416bdb7c9 fixes #2417 ability to hide the new filter "expert mode"
... and removes 2 other duplicates of the filters_views configuration
2025-10-28 18:39:18 +01:00
plegall
f0f4b30ce2 search filters: avoid to write 3 times the same default configuration 2025-10-28 16:35:05 +01:00
Linty
9ac99be1de fixes GHSA-9986-w7jf-33f6 and fixes GHSA-9986-w7jf-33f6
* Introduces a verification code step before generating password reset links.
* New configuration "password_reset_code_duration".
* Adds Base32, TOTP and PHPQRCode classes .
* New section is required in password.tpl: code verification won't work on themes not updated yet.
* 5 new language strings were added.
2025-10-17 15:38:21 +02:00
plegall
5d518e583d next release will be 16.0.0RC1 2025-10-08 10:56:25 +02:00
HWFord
416dbe2d24 issue #2414 change single tag display 2025-10-07 16:47:11 +02:00
HWFord
b682fd0cd3 fixes #2414 change related tags display
Add conf to display or not the related tag options by default
Add templates and css for new display
2025-10-03 15:43:29 +02:00
Linty
58a9447e01 fixes #2413 tag edit/duplicate now use raw_name as editable value 2025-09-26 13:39:28 +02:00
Linty
fcb465f039 fixes #1948 replace cssmin by minify
- switched from cssmin to matthiasmullie/minify for CSS minification.
- the minify lib requires the path-converter lib (from the same author), which has been added as well (in include/minify/path-converter).

This change is necessary because cssmin is not compatible with PHP 8.4
2025-09-23 16:28:29 +02:00
plegall
dae3c772c6 fixes #2328 Piwigo 16 requires PHP 7.4, thus random_bytes is available 2025-09-22 15:36:27 +02:00
Linty
18bb865a23 fixes #2411 disable 3xl and 4xl by default
- Add 3XL and 4XL sizes to defaults but keep them disabled by default
- Update admin restore default derivatives resets sizes and clears cache
- Update migration 177 => updates existing installs: set 3XL/4XL as disabled
2025-09-19 18:49:05 +02:00
Linty
1be0527523 issue #2405 update smarty
and made Piwigo compatible with smarty 5.x
2025-09-17 12:05:48 +02:00
plegall
b167a327e3 issue #2409 add search engine filter : expert mode
* new access system not implemented yet
* dark mode handled but needs review
2025-09-15 15:10:17 +02:00
plegall
124ac245a7 next release is 16.0.0beta2 2025-09-05 14:27:39 +02:00
plegall
cd8c9b7db3 issue #2405 increase PHP required version from 7.1 to 7.4 for the upcoming Smarty update 2025-09-05 14:23:53 +02: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
Linty
dbec498287 fixes #2404 notify users of impending API key expiration
Adds logic to detect when an API key is about to expire and sends a notification email to the user if the key expires within 7 days and no recent notification was sent. Introduces a new 'last_notified_on' column to the user_auth_keys table to track notification timing.
2025-09-04 17:21:53 +02:00
Linty
c078cffb8b fixes #263 add i18n support to date formatting with IntlDateFormatter
Introduced a new format_date function that uses IntlDateFormatter for proper internationalization when available, falling back to the legacy implementation otherwise. The previous format_date function was renamed to format_date_legacy.
2025-09-04 14:10:12 +02:00
Linty
613dd410e5 issue #2364 fix guest author name and language key
Added support for bulk comment validation and deletion with updated confirmation messages and translations. Improved modal dialog behavior, including keyboard accessibility and button visibility. Updated CSS for consistent button styling across themes. Fixed author name display for guest comments.
2025-08-26 16:38:11 +02:00
Linty
57042cc475 fixes #2364 redesign admin comments management
Replaces legacy PHP comment management with a new interface for listing, filtering, selecting, validating, and deleting user comments. Updates templates and CSS for a modern, interactive experience, adds advanced filters, selection mode, and modal comment viewing. Removes obsolete server-side logic from comments.php and introduces new api methods for comment actions.
2025-08-26 14:35:31 +02:00
plegall
09a03d9818 issue #2386 optimize pwg.activity.getList
* fetch block of 10k rows from activity table instead of 500. It's not much slower and may avoid many loops to generate 100 lines of output aggregated lines.

* no need to perform a slow query to count the total number of filtered rows, we can just detect if there are more rows to aggregate to know if we have reached the last page.

* parse details only if we're on a new output key (which is discutable, but we use details only on new output line creation)
2025-08-12 16:03:49 +02:00
plegall
818233cd5e bug fixed: getActivityList, use the same SQL where clause to calculate max_line and fetch lines 2025-08-11 14:39:00 +02:00
Perrom
4dc2fc9f8d fixes #2386 update filters in users activity logs (#2399)
* Add an action filter and a date filter. 

* Additional filters on a specific object (photo/album/group) are available from their dedicated administration page.

* Performances of the page was improved : instead of loading 100k lines in activity table, we loop on 500 activity lines until 100 aggregated lines are found for the current page.
2025-08-08 15:17:50 +02:00
Perrom
2465654752 fixes #2362 add gallery filters options in admin (#2395)
Add a config page in admin for the search filters in the gallery. Privacy and default filters can be selected. Needs a database update.
2025-08-08 15:07:02 +02:00
Perrom
d0ac05d951 fixes #2353 update images with upload form (#2385)
Add a mode to update photos with the upload form. Modify the upload formats form, so that it will update the photo with the same file extension.
2025-07-31 10:41:01 +02:00
Linty
eec9a919a5 issue #2355 enforce ui context for API key management
...and improve profile JS. Replaces can_manage_api_key() with connected_with_pwg_ui() to ensure API key management is only allowed from UI logins, and sets 'connected_with' in session during auto-login. Refactors profile.js to respect canUpdatePreferences and canUpdatePassword, moves user state initialization to template, and improves preference reset/default logic. Also adjusts script loading and minor UI details in profile.tpl.
2025-07-07 08:58:27 +02:00
Perrom
cd09c76c0c fixes #2380 favicon now visible from access warning page 2025-06-30 11:31:47 +02:00
HWFord
b825f45537 fixes #2377 add 3XL and 4XL derivatives 2025-06-26 12:35:03 +02:00
Linty
ae740ba3af fixes #2355 implement API key management system
- Added API key get, creation, editing, and revocation methods.

- Updated the profile template to include API key management features.

- Updated the database schema to support the new API key system, including additional fields for key management.

- Added client-side JavaScript functionality to handle API key operations and display responses.

- Update tools/htm.ws with the new way to authenticate.

- Restriction of certain api methods when used with an api key

- Backward compatibility with older apps
2025-06-09 20:35:57 +02:00
Linty
9bcc2cfa02 fixes #2354 add profile standard page 2025-05-05 21:40:59 +02:00
Linty
7f850c2938 issue #2354 update pwg.users.setInfo
and add pwg.users.setMyInfo method
2025-05-05 20:24:05 +02:00
HWFord
f88472fa9c fixes #2345 create piwigo standard pages
create new theme standard pages with tpl, css, js and images
update backend to handle pages
add config use_standard_pages
on update set config to false, on install set config to true
add standard pages to no be ingored in git
2025-03-18 16:46:41 +01:00
plegall
d5431e9476 issue #2341 fatal error on first call to send_piwigo_infos() 2025-03-12 09:37:44 +01:00
plegall
43afd60d00 issue #2335 whatever the API method called from admin, do not rebuild user_cache 2025-03-10 16:05:14 +01:00
plegall
4488e9bf6c issue #2341 more logger 2025-03-07 15:04:40 +01:00
plegall
c931118561 fixes #2341 force reload conf.send_piwigo_infos_last_notice to avoid double exec 2025-03-06 11:59:18 +01:00
plegall
789c062837 fixes #2336 more details in Logger (execution_uuid) 2025-03-01 14:20:11 +01:00