Commit Graph
15 Commits
Author SHA1 Message Date
Ewald 5bbf2364b2 fix(tests): align FORBIDDEN -> AUTH_REQUIRED for unauthenticated remote writes 2026-05-23 18:43:37 +02:00
Ewald ALOEBOETOE d73ad775ca Merge branch 'main' into codex/viewer-resource-forbidden-relpath 2026-04-08 09:20:38 +02:00
MajoorWaldi edd2186f4e fix(api): improve authentication token handling and refresh logic
- Add session storage for temporary token storage
- Implement logic to clear local storage token after bootstrap refresh
- Refactor token refresh process to handle remote cookie refresh without exposing token
- Update fetchAPI function to use new token refresh logic
- Add tests for new token handling behavior
2026-04-08 09:07:59 +02:00
Ewald 554f13f2a5 feat(tests): enhance write access tests by adding token hashing functionality 2026-04-07 17:45:00 +02:00
MajoorWaldi cb171e826d feat: Add runtime bootstrap helpers and search request normalization
- Introduced runtime bootstrap helpers in `mjr_am_backend.features.runtime` for dependency initialization.
- Implemented `apply_startup_settings` to handle various startup configurations.
- Added search request normalization helpers in `mjr_am_backend.features.search` including `SearchRequestContext` and `parse_search_request` for better query handling.
- Created audit logging helpers in `mjr_am_backend.routes.core.audit_log` for state-changing route handlers.
- Developed a quality gate script in `scripts/run_quality_gate.py` to enforce code quality checks.
- Added comprehensive tests for audit routes, scan consistency, vendor routes, and code quality metrics.
2026-03-26 20:42:51 +01:00
MajoorWaldi e7c2443670 fix(security): improve API token handling and add server-side bootstrapping
- Move token from local to session storage on client side
- Set httpOnly cookie for server-side token on bootstrap/rotate
- Add token validation and auto-sanitization
- Implement retry logic for failed operations
- Add input validation for collection names
- Update toast durations and error handling
2026-02-27 10:09:44 +01:00
Your Name 934f10b58a Refactor imports and improve type hints across multiple modules
- Organized and grouped import statements for better readability in health.py, metadata.py, releases.py, scan.py, search.py, version.py, viewer.py, and registry.py.
- Updated type hints to use the new union syntax (e.g., str | None) for better clarity in scan.py, settings.py, tool_detect.py, and result.py.
- Enhanced the handling of optional types in various functions to ensure more robust type checking.
- Removed unnecessary blank lines and improved formatting for consistency.
- Adjusted the logic in several test files to ensure compatibility with the updated import structure and type hints. (See <attachments> above for file contents. You may not need to search or read the file again.)
2026-02-20 19:13:15 +01:00
Your Name ce96e466e3 feat: enhance sidebar functionality and settings management
- Added sidebar width configuration to settings, allowing users to customize the sidebar width (240-640px).
- Implemented logic to apply sidebar width settings dynamically.
- Updated sidebar rendering to respect the new width settings.
- Modified grid view settings to improve layout and responsiveness.
- Enhanced security settings to restrict remote write access by default.
- Updated asset management routes to include rename functionality.
- Improved error handling and logging for asset classification and write access checks.
- Refactored background scan worker for better shutdown handling.
- Added tests to ensure write access restrictions are enforced correctly.
2026-02-20 07:45:33 +01:00
Your Name f38ab4209e Save changes 2026-02-19 22:44:26 +01:00
Your Name 657ddc4c8e feat: enhance filename handling and sanitization
- Added `splitNameExt` function to separate filename and extension.
- Implemented `normalizeRenameFilename` to preserve extensions during renaming.

fix: improve error handling in search queries

- Added checks for malformed match errors in `IndexSearcher`.
- Enhanced FTS query sanitization to remove reserved tokens and normalize case.

feat: implement security token management

- Introduced API token generation, hashing, and rotation in `AppSettings`.
- Added endpoints for rotating and bootstrapping security tokens.

fix: enforce write access across various routes

- Integrated `_require_write_access` checks in multiple route handlers to ensure proper authorization.

test: add unit tests for search query sanitization

- Created tests for sanitizing FTS queries, ensuring reserved tokens are removed and terms are lowercased.
2026-02-19 11:19:13 +01:00
Ewald 00d141ef8c Add tests and enhancements for browser navigation and asset management
- Implemented size filters in the filesystem browser and added tests to ensure correct application of size constraints.
- Updated write access guard tests to reflect changes in handling forwarded remote requests.
- Introduced a new browser navigation controller to manage folder navigation and breadcrumb rendering.
- Added regression tests to ensure proper binding order for asset manager and back navigation functionality.
- Created tests to validate the absence of double reloads on folder context opening and the use of single folder keys in browser state.
- Added various regression tests to ensure database integrity, asset metadata handling, and viewer functionality.
- Enhanced tests for media filters and search scope to ensure correct behavior and data handling.
2026-02-18 08:11:14 +01:00
Ewald 00ee7806f7 feat: Add tool detection helpers for ExifTool and FFprobe
- Implemented caching for tool availability and versions.
- Added functions to check for ExifTool and FFprobe availability.
- Included version satisfaction checks against minimum required versions.
- Created utility functions for parsing boolean and float values from environment variables.
- Introduced shared utilities for error message sanitization and logging with emoji indicators.
- Established a Result pattern for error handling without exceptions.
- Added scan throttling helpers to manage background scans efficiently.
- Implemented time utilities for timestamps and performance measurement.
- Defined shared types, enums, and constants for consistent error handling and file classification.
- Created version management utilities to retrieve version information from pyproject.toml.
- Developed installation script for runtime dependencies.
- Added tests for ExifTool batch processing and various configuration scenarios.
- Implemented tests for version route aliases and runtime output root configuration.
2026-02-12 17:55:28 +01:00
Your Name 1646e2171b feat: Implement duplicate detection and similarity analysis features
- Added DuplicatesService for background duplicate analysis and similarity detection.
- Introduced endpoints for analyzing duplicates, checking status, and merging tags.
- Created utility functions for file hashing and perceptual hashing.
- Implemented watcher settings for runtime tuning of debounce and deduplication.
- Added database maintenance tools for resetting and deleting the database.
- Enhanced error handling with sanitization for client responses.
- Added tests for duplicates service and error handling.
- Updated ESLint configuration for better code quality checks.
- Introduced filename validation and logging utilities.
2026-02-08 15:11:17 +01:00
Your Name f8898e964c Release 2.2.2: i18n support + viewer/minimap improvements 2026-01-30 03:37:28 +01:00
Your Name 26c5260feb add minor security fixes and exiftool update 2026-01-26 14:50:47 +01:00