Commit Graph

2 Commits

Author SHA1 Message Date
47c264e8e1 fix: update search tests to match actual template output
- Change expected 'Suchresultate' to 'Suchergebnisse' matching results.html
- Change expected 'Keine Resultate' to 'Keine Ergebnisse gefunden'
- Replace test_search_result_logging with test_search_result_structure
- Remove unused unittest.mock import
2025-11-24 11:19:09 +01:00
2350cca32c Enhance search functionality with case-insensitive title search, security improvements, and comprehensive tests
- Add case-insensitive search across all fields (inhalt, titel, geltungsbereich)
- Include Vorgabe.titel field in search scope for better coverage
- Implement comprehensive input validation against SQL injection and XSS
- Add German error messages for validation failures
- Escape search terms in templates to prevent XSS attacks
- Add input length limits and character validation
- Preserve user input on validation errors for better UX
- Add comprehensive test suite with 27 tests covering all functionality
- Test security features: XSS prevention, SQL injection protection, input validation
- Test edge cases: expired content, multiple documents, German umlauts
- Ensure all search fields work correctly with case-insensitive matching
2025-11-04 13:00:02 +01:00