Commit Graph

36 Commits

Author SHA1 Message Date
Matthieu B
59e2cb8199 chore: merge main into ldap branch, resolve conflicts 2026-03-29 16:28:20 +02:00
Matthieu B
73c29458fe fix: resolve all test failures, linting errors, and type errors
- Fix 55 test failures caused by missing request contexts and incorrect
  session_transaction() usage across 8 test files
- Fix ruff import sorting errors and unused imports
- Fix 122 type errors: rename method override parameters to match base
  classes, add None guards for fetchone()/datetime, widen dict type
  annotations, add type: ignore for SQLAlchemy stub limitations
- Add [tool.ty.rules] config to suppress unsupported-base warnings
- Fix _ variable shadowing gettext in wizard routes
- Add noqa: ARG002 for unused method arguments required by base class
2026-03-29 16:20:23 +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
4f80aa4b40 fix: Add locale normalization and improve language selection logic 2025-10-27 13:18:44 +01:00
Matthieu B
9b5aa0972a refactor: remove slop from media and new linting rules 2025-10-23 18:33:50 +02:00
Matthieu B
986e7cb044 fix: Improve SQLite concurrency handling and testing cleanup for database files 2025-10-19 17:57:00 +02:00
Matthieu B
058ddf4782 fix: Improve SQLite connection handling and enable WAL mode with better error checking 2025-10-19 15:28:19 +02:00
Matthieu B
1ef83646d1 feat: Enhance SQLite support with WAL mode and retry logic for commits
- Added SQLite engine options for concurrent write support in BaseConfig.
- Implemented a retry mechanism for database commits in ActivityIngestionService to handle lock timeouts.
- Introduced checkpointing for SQLite WAL files in maintenance tasks to prevent unbounded growth.
- Improved code organization and readability in various modules.
2025-10-19 15:20:22 +02:00
engels74
d0df4c6d5d feat: wizard step refactor into pre/post wizard steps
Changes:
  - Pre/post invitation wizard phases
  - Phase-aware routing (/pre-wizard/*, /post-wizard/*)
  - Phase indicator badges (visual categorization)
  - Dynamic completion button behavior
  - Two-column admin layout with category drag-and-drop
  - Invite code management service
  - Enhanced wizard export/import
  - Comprehensive test coverage (17 new test files)
2025-10-16 15:28:48 +02:00
Matthieu B
cddfaf25b2 fix: update dependencies and configuration for improved linting and SQLAlchemy integration 2025-10-08 16:46:30 +02:00
Matthieu B
d34ee91553 feat: notified of new update 2025-09-16 16:03:51 +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
48813a9f7c Update API key management UI and integrate CSRF protection 2025-08-13 21:48:48 +02:00
Matthieu B
d69feaf67f Complete Flask-RESTX migration for automatic API documentation
 Replaced manual API documentation with Flask-RESTX OpenAPI generation
 All endpoints now auto-generate Swagger UI at /api/docs/
 Maintained backward compatibility - all existing API functionality preserved
 Added comprehensive OpenAPI models for request/response validation

Changes:
- app/blueprints/api/api_routes.py: Migrated from Flask routes to Flask-RESTX Resource classes
- app/blueprints/api/models.py: Created OpenAPI schema definitions
- app/extensions.py: Added Flask-RESTX configuration with API key security
- pyproject.toml: Added flask-restx>=1.3.0 dependency
- README.md: Updated API documentation to point to interactive Swagger UI
- docs/API.md: Simplified to quick-start guide pointing to automatic docs
2025-08-13 20:16:07 +02:00
Matthieu B
e9acc3fdba Enhance user management by improving modal interactions and user table refresh logic 2025-08-13 19:20:38 +02:00
Matthieu B
0da4099670 Enhance application startup logging and scheduler management in create_app and init_extensions functions 2025-08-13 11:09:32 +02:00
Matthieu B
ccf670179e Refactor code structure for improved readability and maintainability 2025-08-13 10:55:50 +02:00
Matthieu B
4ec577b0c5 revamp logging 2025-08-12 19:53:27 +02:00
Matthieu B
9fde1d1edf Implement centralized startup logging and enhance application initialization messages 2025-08-12 19:37:13 +02:00
Matthieu B
000dc024b3 feat: implement robust session cache to handle stale file handle errors
fix: enhance scheduler initialization to skip during migrations
chore: update docker entrypoint to skip scheduler during migrations
docs: add detailed explanation for session cache stale file handle fix
2025-08-09 20:22:51 +02:00
Matthieu B
c7b9667c3b refactor: enhance scheduler initialization to account for gunicorn worker context 2025-08-08 18:57:07 +02:00
Matthieu B
826f279ab1 fix 2025-08-08 17:57:37 +02:00
Matthieu B
63f3125be7 refactor: improve scheduler initialization and logging in extensions and gunicorn config 2025-08-08 17:39:38 +02:00
Matthieu B
d4dd57ee1e feat: Add comprehensive connections and expiry management system
- Add new connections management system with MediaConnection and DiscordWebhook models
- Implement dynamic server configuration with URL field support
- Add expiry management system with automatic user cleanup
- Create wizard preset system for streamlined server setup
- Add dedicated connections interface in settings with CRUD operations
- Integrate expiry functionality with connection management
- Add proper form validation and error handling
- Update templates and routes for new connection workflow

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 22:21:10 +02:00
Matthieu B
92bdfb9255 refactor: remove init_security_headers function and its call from init_extensions 2025-07-29 12:37:06 +02:00
Matthieu B
3b3d8e216d refactor: update limiter configuration to disable default limits and improve clarity
feat: enhance poster URL handling in PlexClient for better image accessibility
2025-07-24 18:43:42 +02:00
DesignGears
3183ec4186 style: fix formatting and add missing comma in limiter config
Fix inconsistent formatting in PlexClient transcode check by splitting condition into multiple lines
Add missing trailing comma in limiter configuration for better readability and maintainability
2025-07-20 19:41:46 -06:00
DesignGears
3a07d7d1e4 refactor(limiter): improve limiter configuration readability and add storage
Add memory storage URI to limiter configuration for better clarity and explicit storage backend
2025-07-19 10:26:30 -06:00
Matthieu B
dd03948e58 feat: Add rate limiting to various routes and integrate flask-limiter 2025-07-18 17:37:46 +02:00
Matthieu B
02126de7b8 Add ty dependency and pre-push hook for type checking
- Added `ty` version 0.0.1a14 to dependencies in `pyproject.toml`.
- Updated `.pre-commit-config.yaml` to include a pre-push hook for type checking using `ty`.
- Made minor adjustments in various files to ensure compatibility with type checking.
2025-07-15 21:32:43 +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
c86cc75e32 Added Multi-Admin Accounts 2025-07-08 19:14:07 +02:00
Matthieu B
6c8fcec145 fix and close #593 2025-06-10 15:55:29 +01:00
Matthieu B
9f1ed258f8 Single Schedueler 2025-05-22 19:25:52 +01:00
Matthieu B
4889e25d31 Huge rewrite 2025-05-20 13:01:20 +01:00