Fix path handling, calculations, and security validations#75
Open
pablo-schmeiser wants to merge 8 commits intoHaDiNet:masterfrom
Open
Fix path handling, calculations, and security validations#75pablo-schmeiser wants to merge 8 commits intoHaDiNet:masterfrom
pablo-schmeiser wants to merge 8 commits intoHaDiNet:masterfrom
Conversation
… count efficiency
Add host validation for post-login redirects. Add host validation for success_url redirect in BaseMixin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and bug fixes across the codebase, focusing on performance optimizations, security enhancements, and code correctness. The most notable changes include optimizing database queries, tightening redirect URL validation, correcting logic in recurring shift handling, and improving timezone and locale settings.
Performance and Query Optimization:
shift_countinUserby aggregating all relevant user IDs and performing a single query, reducing database load and improving efficiency.cached_propertyforparticipant_countinShift, and refactored related properties to use this cached value, minimizing redundant database queries.Security Improvements:
url_has_allowed_host_and_schemeto prevent at least 2 Open Redirect Vulnerabilities (CWE 601), and added error handling for unsafe URLs.Bug Fixes and Logic Corrections:
_matches_every_nth_weekdayto use integer division, ensuring accurate recurrence logic.startandendtimes are present before performing the check.Settings and Configuration Adjustments:
os.pathfor path handling, ensuring compatibility and correctness.Permissions Handling: