5.03v โœจ Add Jitsi video/voice call integration, harden IP/proxy & permission checks, and remove legacy modules - ๐Ÿ“น Add Jitsi video and voice call integration (`lhjitsi` module with `erLhcoreClassJitsi`): operator call invitations from chat info (`jitsi_call.tpl.php`), configuration (`jitsi/configuration`), visitor/operator join, accept, deny, cancel, status polling, and widget JS execution (`jitsi_executejs.tpl.php`) - ๐Ÿ” Harden IP detection and proxy handling in `erLhcoreClassIPDetect`: trust forwarded headers (`proxy_header`, defaulting to `HTTP_X_FORWARDED_FOR`) only from configured `trusted_proxies` (or private/reserved ranges when `trusted_proxies` is empty and `proxy_mode` is enabled), walk `X-Forwarded-For` right-to-left, and remove `system/autodbupdate` and `update_ip` - ๐ŸŒ Add `restapi/ip` endpoint (`lhrestapi/ip.php`, documented in `swagger.json`) returning detected client `ip` and `remote_addr`, enforcing `allow_login_from_ip` restrictions - ๐Ÿ›ก๏ธ Restrict online visitor info (`chat/getonlineuserinfo`), notice sending (`chat/sendnotice`), and operator file upload (`file/uploadfileadminonlineuser`) by department permissions (`sees_all_online_visitors` / user departments) - โœ‰๏ธ Support pending conversation status via `X-LHC-ST` custom email header in `erLhcoreClassChatMail` and `erLhcoreClassMailconvParser` - ๐Ÿ’ฌ Add `erLhcoreClassChatValidator::isVisitorNickAllowed()` and support decrypted custom fields (`try_decrypt` / encrypted `type == 3`) in `erLhcoreClassChatValidator`; add move up/down rule reordering controls in `LHCMaskingRules.svelte` - ๐Ÿงน Remove legacy modules and templates: `lhcobrowse`, `lhchatbox`, `lhfaq`, `lhquestionary`, `lhbrowseoffer`, legacy chat widget/screenshare endpoints and templates, and online user screenshot templates - ๐Ÿ”„ Bump `LHC_RELEASE` to 503 5.02v โœจ Link e-mails sent from chats back to their originating chat, improve mail escalation and security - ๐Ÿ—„๏ธ Add `follow_up_chat_id` column to `lhc_mailconv_conversation` via update_367.sql, both install scripts, `structure.json`, `db.dbml`, POS definition, `swagger.json`, `MergeHelper` and the conversation model `getState()` - ๐Ÿ“ค Attach the `X-LHC-CID` custom header when sending an e-mail from a chat (`mailconv/sendemail/(chat_id)/` and `chat/sendmail`) so back-imported conversations (including undelivered bounces) store the originating `follow_up_chat_id` in `erLhcoreClassMailconvParser` - ๐Ÿ’ฌ Show a clickable related chat link (`lhc.previewChat`) next to the follow-up link in `MailChat.js` when a mail conversation has a `follow_up_chat_id` - โœ‰๏ธ Improve mail sending and escalation UI with TinyMCE file and template plugins, Cc/Bcc recipients, HTML mail guardrails, sensitive content masking, and restricted mail download permissions - ๐Ÿ” Harden security across modules: enforce REST API permissions and validation order, prevent SSRF via URL validation, restrict log files/extension folders, add configurable WebAuthn user verification for passkeys, and add dual-view masking diagnostics - ๐Ÿ”„ Bump `DB_VERSION` to 367 and `LHC_RELEASE` to 502 execute doc/update_db/update_367.sql for update 5.01v โœจ Restrict passwordless logins, add REST API key only accounts and improve widget voice/file previews - ๐Ÿ—„๏ธ Add `api_key_login_only` and `disable_autologin` flags to `lh_users` via update_366.sql, both install scripts, `structure.json` and the POS definition; the user model, `getState()` and the new/edit user windows expose them (new user form checkboxes and an access summary alert in the account edit window showing whether the operator can log in with a password and whether they can be logged in without one) - ๐Ÿ” `erLhcoreClassUserUtils` gained the account level login rules `isLoginIpAllowed()`, `isApiKeyLoginOnly()`, `isPasswordLoginAllowed()`, `isAutologinAllowed()` and `fetchAutologinUser()`, which every passwordless login path now has to use - `api_key_login_only` accounts can no longer log in with a username and password (checked in the login form and in `erLhcoreClassUser::loginUser()`) and `disable_autologin` accounts can no longer be logged in without credentials - ๐Ÿšช Block passwordless login for such accounts in `user/autologin`, `user/autologinuser`, `user/loginasuser`, `restapi/loginbytoken`, the chat accept e-mail link and the saved report "verified" login, returning a clear "not allowed for this user" error instead of logging the operator in; the login IP restrictions are now also applied by these paths through the same shared helper - ๐Ÿ”‘ Passkey login keeps working for accounts with `disable_autologin` - `erLhcoreClassUser::setLoggedUser()` accepts a `$credentialsVerified` flag used by `user/passkeylogin` because a passkey is a real credential; the account level login IP restriction is checked there explicitly - ๐Ÿ  Serve autologin style endpoints only from a back office site access - the new `getLoginSiteAccess()` / `validateLoginSiteAccess()` helpers follow the same rules as `user/login` (including the `user.login_site_access` event) and reject requests made on a non-admin site access in `chat/accept`, `user/autologinuser`, `user/loginasuser`, `user/updatepassword` and the browser mode of `restapi/loginbytoken` - ๐Ÿงพ Chat accept e-mail links now generate and verify their verification hash through `erLhcoreClassModelChatAccept::generateEmailVerificationHash()` / `validateEmailVerificationHash()` with a timing safe `hash_equals()` comparison, and the mail and XMP senders use the same helper so the link and its validation can not drift apart - ๐Ÿ”Ž The system update security overview reports administrators who can still be logged in with an autologin link and operators behind an active REST API key which are not limited to API key login with autologin disabled, both turning the check into a warning with a counter badge - ๐ŸŽ™๏ธ Widget voice messages: recording starts immediately and shows the microphone input level, the upload result is shown in the status area and cleared afterwards, pending recorder initialization is cancelled and panel resources are released, the upload validates the HTTP status and the explicit server success flag, and the recorder WASM paths were fixed with a local polyfill fallback instead of an external CDN - ๐Ÿ–ผ๏ธ Unsent file previews are restored after a page refresh - `lhwidgetrestapi/initchat` returns the temporary preview files of the chat with short lived download links and the widget file preview handlers are lazy-loaded - ๐Ÿ™‚ New widget theme option "Show BB code (emoji) button next to settings" (`bbc_direct`) exposes the BB code button in the widget toolbar - ๐ŸŒ `erLhcoreClassTranslate::detectChatLanguage()` skips language detection for very short texts (three words or fewer and at most 20 characters) because the result is unreliable, so the chat keeps its configured language - ๐Ÿ”„ Bump `DB_VERSION` to 366 and `LHC_RELEASE` to 501, and raise the widget React app version to 429 execute doc/update_db/update_366.sql for update 5.00v Track configuration object creation and changes - Add creation time, modification time and modifying user to incoming and outgoing webhooks, chat start settings, departments, department groups, mailboxes, response templates and user groups. - Preserve creation metadata on edits and assign fresh metadata to copies and imports. - Bump DB_VERSION to 365 and LHC_RELEASE to 500. execute doc/update_db/update_365.sql for update 4.99v โœจ Track mail replies waiting for import, mail close event and query indexes - โœจ Support bot text messages for mail conversations - ๐Ÿ—„๏ธ Add the `pending_import` flag to `lhc_mailconv_conversation` via update_364.sql, both install scripts, `structure.json`, `db.dbml`, the POS definition, `swagger.json` and the model `getState()` - ๐Ÿ“ค Set `pending_import = 1` in `erLhcoreClassMailconvValidator::sendReply()` when the sent folder copy was stored, so an operator reply becomes visible only after the background import fetches it back; a failed copy keeps it at `0` - ๐Ÿ“ฅ Reset `pending_import = 0` in `erLhcoreClassMailconvParser` whenever a newer message is imported for the conversation, and on merge/un-merge in `MergeHelper` - ๐Ÿ–ฅ๏ธ Show a cloud-download indicator in the mail conversation list while a reply is waiting to be imported - ๐Ÿ”— Dispatch the `mail.conversation_closed` event from `erLhcoreClassMailconvWorkflow::closeConversation()` with a `close_source` argument (`operator`, `auto_close`, `import`, `system`) so bot workflows and webhooks can react to closes, and pass the close source from the auto-close cron and from imports - ๐Ÿงช Add the missing `mail.conversation_closed` event template to the webhook dispatch tool - ๐Ÿš€ Add composite indexes to speed up frequent lookups: `evaluated_user_id_ctime` (`evaluated_user_id`, `ctime`, `form_id`, `attr_int_1`) on `lh_abstract_form_collected` for agent/chat QA aggregations, `api_key_active` (`api_key`, `active`) on `lh_abstract_rest_api_key` replacing the `api_key` index for active key lookups, and `nick_btype` (`nick`, `btype`) on `lh_chat_blocked_user` for blocked user lookups - ๐Ÿ”„ Bump `DB_VERSION` to 364 and `LHC_RELEASE` to 499 execute doc/update_db/update_364.sql for update 4.98v โœจ Add audit trail metadata, agent evaluation forms and security visibility - ๐Ÿงพ Add `created_at`, `updated_at` and `muser_id` audit columns to abstract objects (auto responders, widget themes, e-mail templates, chat columns, chat variables, chat priorities, chat alert icons, content chunks, offline reasons, forms, products, subjects, surveys, browse offer invitations, proactive chat campaigns/events/invitations/variables, REST API keys) and bot objects (bots, triggers, bot REST APIs, translation groups) via update_363.sql, install scripts, structure.json, db.dbml and POS definitions; the new `erLhcoreClassAbstract::setAuditTrail()` and `erLhcoreClassGenericBot::setAuditTrail()` helpers fill them automatically on create/update, and the audit fields are reset when an object is cloned/copied so a copy does not inherit the original author - ๐Ÿงฎ Add agent evaluation forms: `agent_evaluation` flag on forms, `evaluated_user_id` and `scope` on collected records, a new operator field type (`renderInputTypeUser`, mappable to `evaluated_user_id` via `form_attr`) with validation and dropdown rendering, `Fill` shortcuts to create and edit an evaluation straight from the collected records list (`form/fill//(collected_id)/`), an evaluated operator column and filter in collected records, and per-form QA score/count columns in agent statistics including its Excel export - ๐Ÿ” Split `view_fm` from `manage_fm` (view forms and collected records vs. create/edit forms), require `manage_fm` for new/edit/clone (`permission_edit`) of forms, and require `fill_private` to fill private forms - ๐Ÿ›ก๏ธ Private forms can now be filled only by a logged in operator holding `lhform`/`fill_private` in both `form/fill` and `form/formwidget`, closing the direct URL bypass of the widget endpoint; an agent evaluation record can be re-filled only by an operator with that permission and only for the same form - ๐Ÿ”Ž Rework the system update security overview into a sorted, full-width table with severity badges, issue counter and configure links - autologin, debug output, HTTPS, iframe embedding, password policy, login IP restriction, one login per account, custom admin siteaccess, REST API keys/by-user authentication, mobile notifications and the number of enabled administrators (with a warning when there are none) - ๐Ÿšซ Stop generating a random `export_hash` during install (web and CLI) - export is disabled by default, an empty hash is reported as "export disabled" instead of "weak", the error message is now "Export hash is empty or too short!" and chat export endpoints (getchat/getcount/getlist) also honour the login IP restrictions - ๐Ÿ“ก Support `ignore_typing`, `ignore_debug`, `ignore_json` and `ignore_execute_js` parameters in the `fetchchatmessages` REST API (meta message filtering, documented in swagger.json) and filter system messages in SQL for both live and archived chats; the swagger documentation endpoint now honours back office IP restrictions - ๐Ÿ”’ Enforce login IP restrictions (including the per-user bypass list) for autologin and the XML checklogin endpoint, log blocked and successful autologin attempts, and validate login/autologin redirect targets with the new `erLhcoreClassUserUtils::isValidRedirectPath()` to prevent open redirects; collected form content is unserialized with `allowed_classes => false` - ๐Ÿ”— Incoming webhooks can take the second chat id part from a GET parameter when it is not present in the payload - ๐Ÿค– Bot: add a "Do not dispatch file modification event" option to the `fileattribute` command (skips `file.main_attr_updated` / `mail.file.main_attr_updated`) and generate the mail Message-ID in the sender's domain instead of the server hostname (server hostname stays as fallback) - ๐Ÿ› Mail: snapshot `user_id` and the archive state before closing a conversation in `mailconv/apicloseconversation` and `mailconv/apinoreplyrequired` (the archive check and interaction log used the already closed record), log the missing "no reply required" interaction and do not close archived conversations - ๐Ÿ› Files: strip MIME parameters (e.g. `; charset=binary`) before type comparisons and base64 data URI generation in REST API actions and in the `file_body` accessors, and unify chat/mail file details views with bold labels, translatable Description/MIME Type and Chat/Message ID - ๐Ÿ” Mailbox passwords are no longer rendered into the mailbox edit form - the stored value is shown as a placeholder and a new "Remove stored password" checkbox clears it, while an empty field keeps the current password - Password changes now revoke previously issued REST API session tokens (`lh_users_session`): the new `erLhcoreClassModelUserSession::revokeForUser()` blanks every token of the operator and is called from the self-service account update, the administrator user edit, the forgot-password reset (both the manually entered and the generated password variants), the auto-login password update, the CSV user import and the REST API user update, so a token issued before the change can no longer be exchanged into an operator session through `restapi/loginbytoken`; the token rows are kept (device registration and push notification settings survive) and are reused by the next login on that device, and `loginbytoken` now fails instead of answering "Session started" when the operator cannot actually be logged in (e.g. a disabled account) - Bump the widget wrapper to 282 and stop syncing the widget open/close state between browser tabs - ๐Ÿงน Remove redundant empty `functions` arrays and unused `script` entries from module view definitions and declare empty `functions` explicitly for public views (export, loginasuser, forgotpassword, remindpassword) execute doc/update_db/update_363.sql for update Roles which had only `manage_fm` have to be granted `view_fm` to keep access to the collected records list. 4.97v โœจ Add file captions/OCR attributes, file bot actions, file webhooks and login history filters - ๐Ÿ—„๏ธ Add caption and caption_ocr columns to lh_chat_file and lhc_mailconv_file tables via update_362.sql, install scripts, structure.json, db.dbml and POS definitions - ๐Ÿค– Add fileattribute bot command to set caption/caption_ocr on chat and mail files (new attribute||value line format with legacy fallback), block setting primary key via setchatattribute, add "do not dispatch modification event" option so file.main_attr_updated/mail.file.main_attr_updated is not fired - ๐Ÿ”— Dispatch file.mail_import.file_store and file.uploadfile.file_store events, move file.storescreenshot.store dispatch after transaction commit so bot workflows act on fully saved files - ๐Ÿ Support chat_file context in bot conditions, REST API actions (file_ent chat/mail), and bot worker fetching mail/chat files with fallback chat resolution - ๐ŸŒ Add file.uploadfile.after_save and file.mail_import.file_store to webhooks debug dispatch and allow file classes in reflection allow-list - ๐Ÿ“œ Display caption/OCR/dimensions info in chat file lists, mail file lists and edit pages - ๐Ÿ” Add IP and date range (with hour/minute/second) filters to login history plus allowed-IP status column - ๐Ÿ” Require IP restrictions for REST API user-based authentication and redirect non-admin site access logins to admin login - ๐Ÿ› Fix PHP 8.1 null deprecation in REST API variable extraction, guard chat_id=0 in bot worker execute doc/update_db/update_362.sql for update 4.96v 1. Notable changes since 4.95v - Offline reason modes: offline reasons gained a `mode` field ("Offline Mode" by default, "Online mode"), so an operator can pick a reason such as "Training" and stay online instead of going offline. Selecting an online mode reason keeps `hide_online = 0`, stores the reason on the operator and, when the operator was offline, creates a new online record in `lh_users_online_session`; the reason is stored in the new `online_reason_id` column so the offline reason value is not overwritten, and online hours statistics show both the offline and the online reason. Switching reason while the operator is already online also starts a new online record, but the previous record is closed exactly at the new record start so online hours shows no bogus "sync timeout" gap (and a zero length gap is not rendered at all). Switching back to plain online clears the reason. The status control and the "Set online status" modal list the available reasons with their mode. - Reason enforced restrictions: reasons gained "Disable auto assigned" and "Disable transferring chats/mails to me manually if I am in this mode"; both apply only to "Online mode" reasons (an offline reason already keeps the operator out of the online assignment). While an operator is online with such a reason his `exclude_autoasign` / `exclude_autoasign_mails` flags are set on the department assignments so the chat and mail auto assignment workflows skip him, and the operator's own preference is restored when he switches away; "Disable transferring..." blocks manual chat/mail transfer and owner change to that operator. - Private group chats: messages and history of a private group chat are now accepted only from its own members. - Chat e-mail hardening: the chat e-mail is now escaped inside the `mailto:` link of the operator information row, so a value stored by an earlier version can no longer break out of the attribute; an invalid e-mail submitted while the pre-chat form "E-mail" field is optional is no longer persisted, the value stays empty until a valid address is provided, and the offline request path only copies the e-mail into the chat after `FILTER_VALIDATE_EMAIL` accepts it. - Demo chat endpoint access: the publicly reachable `chat/demo` endpoint is now gated behind a logged in operator holding the `lhchat`/`use` permission or an anonymous request presenting an `e2e_secret` parameter matching the `E2E_SECRET` environment variable (compared with `hash_equals` to avoid timing leaks); unauthenticated visitors are redirected to the login page and logged in users without the permission get the no-permission page, preserving the previous behaviour. - Widget: fixed the mobile widget message input and send button being covered by the Firefox for Android 132+ toolbar and keyboard - while the full screen mobile widget is open `interactive-widget=resizes-content` is appended to the host page viewport meta (pages that set `interactive-widget` themselves are left untouched) and the original value is restored when the widget is closed (wrapper version 279); the initial scroll position is now applied before the messages become visible, so the visitor no longer briefly sees the messages at the top, and scrolling is done instantly inside the widget's own messages container instead of scrolling the parent page (React app version 428). - Notifications: replaced the dead VAPID key generator link in the notification settings (`web-push-codelab.glitch.me` now returns 410 Gone) with `pwastack.com/tools/vapid-key-generator`. - Miscellaneous: updated install scripts, `structure.json` and `db.dbml` for the three new `lh_abstract_offline_reason` columns and the `lh_users_online_session.online_reason_id` column; bumped version to 4.96v. 2. Summary - This release adds operator "online mode" offline reasons: an operator can pick a reason such as "Training" and stay online instead of going offline, the reason is recorded in the new `online_reason_id` column and shown together with the offline reason in online hours statistics, and a reason can disable auto assignment and manual chat/mail transfer to that operator while it is active. - Security and input hardening: the chat e-mail is escaped in the operator `mailto:` link and invalid e-mail input is rejected, the public demo endpoint requires an operator or the E2E secret, and private group chat messages and history are limited to their members. - Widget and UX fixes: the mobile widget works with the Firefox for Android keyboard, opens at the correct scroll position without scrolling the parent page, and the notification settings point to a working VAPID key generator. execute doc/update_db/update_361.sql for update