What's Changed
This release introduces a WebSocket server that enables real-time synchronization across all connected clients. Changes made by one user are instantly reflected in the interfaces of other users browsing the same folder.
What's new:
- New WebSocket daemon (websocket/bin/server.php) based on Ratchet + ReactPHP
- Real-time broadcast of item events: creation, update, deletion, copy
- Real-time broadcast of folder events: creation, update, deletion, permission changes
- Real-time user events: key generation status, task progress, session expiry
- Client library (teampass-websocket.js) with auto-reconnect and exponential backoff
- Heartbeat / ping-pong mechanism to detect stale connections
Collaborative Editing Lock
- Users who open an item for editing now lock it for other users
- Other users see a visual indicator that the item is being edited
- Lock is automatically released when the user closes the item, navigates away, or disconnects from the WebSocket
- Locking is enforced on delete and move operations as well
Items Page Improvements
- Items list auto-refreshes when another user creates or deletes an item in the same folder
- Item view auto-refreshes when another user updates an item being viewed
- Faster loading when saving a new item
- Reduced unnecessary AJAX calls during item edition
- Improved multi-item edition mechanism with immediate lock release
Custom Fields
- Improved custom fields encryption
Background Tasks
- Background tasks are immediately launched after a triggering action (no wait for next cron cycle)
- Improved toastr notification to inform users when the encryption key generation process completes
UI & UX
- Improved toastr notification handling on the items page
- When the server returns a security error (ERROR NOT ALLOWED, ERROR SESSION EXPIRED, disconnection), an explicit HTML modal is now shown to the user
- 2FA method selector is now only shown to users whose role requires MFA (previously shown to all users)
Performance
- cache_tree performance optimized: N+1 queries eliminated, per-user invalidation, client-side caching
- Accessible folders resolved from cache_tree instead of JWT payload
Code Quality & Static Analysis
- Codebase progressively brought to PHPStan level 4 compliance
- Various code quality and Scrutinizer fixes
Role Permissions
- Deprecated folder restriction mechanisms removed
- Real-time role permission refresh via WebSocket events
Installation & Upgrade
- Upgrade script upgrade_run_3.1.7.php adds three new database tables:
- teampass_websocket_events — event queue
- teampass_websocket_tokens — authentication tokens
- teampass_websocket_connections — connection log
- Installation/upgrade process adapted to include WebSocket dependencies
- Systemd service unit provided (teampass-websocket.service)
Full Changelog:
Important
- Requires at least
PHP 8.1 - New password library implemented, read about impacts
Languages
Please join Teampass v3 translation project on Poeditor and translate it for your language.
Installation
Follow instructions from Documentation.
Upgrade
Follow instructions from Documentation.
Ideas and comments
Are welcome ... please use Discussions.