Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Enhance Search Functionality and Security #136

Merged
merged 3 commits into from
Dec 15, 2024

Conversation

hareshkainthdbt
Copy link
Collaborator

Details of the pull request
  • Refactor search logic for clarity and maintainability
  • Improve query handling and sanitization steps
  • Enhance SQL injection safety and prevent risks
  • Update dependencies for improved security and functionality
  • Update tests to reflect new logic and coverage for edge cases
  • Adjust sorting and logging for better readability

Revised `create_search_query` to handle AND/OR logic better and prevent SQL injection risks. Enhanced tests to validate query safety, adding coverage for edge cases. Updated dependencies to include improved security and functionality for library versions.
Refactored the search logic to enhance clarity and maintainability, introducing better query object handling and sanitization steps. Added `sanitize_all_if_needed` to prevent redundant sanitization and refactored config logging for consistency. Updated tests to reflect the new sanitization logic and adjusted sorting and logging for improved readability.
Simplified the query formation logic and improved code readability. Replaced precise ID matching and full-text query generation with a more coherent approach. Adjusted sort logic to ensure relevance-based sorting is descending.
@hareshkainthdbt hareshkainthdbt merged commit a44b9f7 into main Dec 15, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant