Commit Graph

33 Commits

Author SHA1 Message Date
Matthieu B
672475469d fix(ldap): security, architecture, and code quality improvements
- Fix SUBTREE→BASE scope in _fetch_user_attributes (security)
- Remove is_ldap_user threading from all 8 media client interfaces;
  set flag after join via workflow-level User.query.update instead
- Use find_user_dn (search-based) instead of build_user_dn (concatenation)
  in delete_user and reset_user_password for robustness
- Wrap all user-facing strings in _() for i18n in ldap_auth.py
- Fix username fallback from hardcoded "wizarr" to unique per-user
- Return failure from _update_existing_user when password update fails
- Replace dynamic Tailwind classes with explicit conditionals in alert
- Add stale group cleanup and upsert in sync_ldap_groups
- Remove fake @ldap.local email fallback in user_sync
2026-03-29 16:18:41 +02:00
Matthieu B
498886c06a fix(ldap): address security, correctness, and code quality issues
Security:
- Fix XSS in HTMX responses by replacing f-string HTML with Jinja partials
- Fix TLS verify_cert not being applied (add Tls config to ldap3 Server)
- Fix password_hash NOT NULL conflict for LDAP-only admin accounts
- Fix should_create_ldap_user defaulting to True for existing invitations

Correctness:
- Fix DN reconstruction fragility using escape_rdn for special characters
- Fix connection leaks with try/finally in all LDAPClient methods
- Fix sync interval logic (check FLASK_ENV not WIZARR_ENABLE_SCHEDULER)
- Only register LDAP sync job when LDAP is actually configured
- Make find_user_dn and service_connection public API methods

Cleanup:
- Squash 5 incremental LDAP migrations into single 20251226_add_ldap_support
- Remove duplicate imports/queries in auth routes
- Replace f-string logging with %s formatting
- Extract inline HTML to Jinja template partials
2026-03-29 15:58:09 +02:00
Erwan Leboucher
5bb51e0cf1 feat(ldap): add LDAP authentication and invitation integration 2025-12-27 17:14:17 +01:00
Matthieu B
4af196f0b8 feat: add manual cleanup route for expired users in settings closes #1047 2025-12-09 14:24:21 +01:00
Matthieu B
0050f4b646 feat: allow user edit 2025-11-03 14:36:04 +01:00
Matthieu B
f41cd7d8b1 feat: display application version in general settings page 2025-10-06 13:09:35 +02:00
Matthieu B
486e40e202 fixes and closes #784 #772 #795 2025-08-27 22:08:37 +02:00
Matthieu B
5c40d62765 Remove CSRF token from forms and update button styles for consistency 2025-08-13 22:25:15 +02:00
Matthieu B
9fde1d1edf Implement centralized startup logging and enhance application initialization messages 2025-08-12 19:37:13 +02:00
Matthieu B
f08e02386c fix and closes #708 2025-07-15 15:13:40 +02:00
Matthieu B
7b8f64af7d Fix SQLAlchemy model constructors to accept keyword arguments
- Added __init__ constructors to all SQLAlchemy models
- Fixed pyright 'No parameter named' errors across the codebase
- Fixed various ruff linting issues (SIM108, E741, E402, SIM102, B904, SIM105)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 13:52:15 +02:00
Matthieu B
be1bdb83f1 added translation strings 2025-07-11 15:29:52 +02:00
Matthieu B
2ca6c22764 feat: Add multi-server invite support with Jellyfin integration
- Add support for inviting users to multiple media servers simultaneously
- Implement Jellyfin-specific invite options (Allow Downloads, Allow Live TV)
- Add server type detection and conditional UI rendering in invite form
- Create new database migration for Jellyfin server options
- Update invite service to handle multi-server invitations
- Add server-specific validation and error handling
- Enhance user management with server-specific permissions
- Update templates to show server-specific invite options
- Add middleware support for multi-server authentication
- Improve settings forms with server type-specific fields

Breaking changes:
- Invite form now requires server selection
- User permissions are now server-specific
- Database schema updated for multi-server support
2025-07-03 16:18:50 +02:00
Matthieu B
1b1684eee1 romm wizard step 2025-06-26 15:30:19 +02:00
Matthieu B
6e7f3b0506 Added Romm support, and simplified Media APIs to reduce code duplication. 2025-06-20 20:22:45 +02:00
Matthieu B
010d6120cd fix redirect 2025-06-18 21:29:06 +02:00
Matthieu B
6cc740eba9 Update wizard access protection settings and Settings UI
Close #611
2025-06-16 21:08:59 +01:00
Matthieu B
6ffce56a22 Add external url to media server 2025-06-13 14:57:58 +01:00
Matthieu B
772bc24fa6 Added multiple servers support and identity linking 2025-06-13 14:37:57 +01:00
Matthieu B
8777ebe4bf Merge pull request #616 from fireph/server-error-translations
Support translations for server error messages
2025-06-11 11:07:15 +01:00
Matthieu B
db7867b7bb added version logging 2025-06-10 23:13:14 +01:00
fireph
ef8176926e Support translations for server error messages 2025-06-10 12:13:12 -07:00
Matthieu B
0f43928fdb Merge pull request #605 from fireph/server-url-error-handling
Server URL error handling improvements
2025-06-10 16:39:42 +01:00
fireph
993624895f Add error handling and display for server url 2025-06-09 20:18:16 -07:00
fireph
27bac94dea Fix settings page not loading when using reverse proxy with https 2025-06-09 16:27:46 -07:00
fireph
2aba8ab0c8 Fix settings toggles to save correctly
The Plex Downloads and Plex TV checkboxes in settings were not saving correctly. This is because it was an issue with the booleans being stringified in the db and not being converted back properly. Now they are saved as "true"/"false" in the db and then converted back to booleans in the _load_settings() function. This was the best fix I could come up with, but let me know if you have any better ideas.
2025-06-03 18:51:24 -07:00
Matthieu B
6fde368fde fig bug emptying libraries if not selected 2025-05-24 19:19:46 +01:00
Matthieu B
f8abcda955 overhaul of media clients 2025-05-24 18:11:58 +01:00
Matthieu B
abc63bfb83 fix onboarding not being shown 2025-05-23 22:40:59 +01:00
Matthieu B
d39af08aae Single Schedueler 2025-05-22 19:43:52 +01:00
Matthieu B
19fa6e497a Import Legacy Database 2025-05-22 18:50:03 +01:00
Matthieu B
178ccd92b1 Huge rewrite 2025-05-21 12:05:15 +01:00
Matthieu B
4889e25d31 Huge rewrite 2025-05-20 13:01:20 +01:00