-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(settings): Drop time_zone #12999
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
feat(settings): Drop time_zone #12999
Conversation
This pull request identifies a logic flaw in the
Logic Flaw due to Date-Only Comparison in
|
Vulnerability | Logic Flaw due to Date-Only Comparison |
---|---|
Description | The sla_violated method uses Q(sla_expiration_date__lt=now().date()) . If sla_expiration_date is a DateTimeField , this comparison will not correctly identify SLAs that expire on the current day. Any SLA expiring at any time on the current day will only be flagged as violated on the following day, as its DateTimeField value will not be strictly less than now().date() (which represents the beginning of the current day). This leads to a delay in reporting SLA violations. |
django-DefectDojo/dojo/filters.py
Lines 222 to 228 in f618ae0
risk_accepted=False, | |
is_mitigated=False, | |
mitigated=None, | |
) & Q(sla_expiration_date__lt=now().date()), | |
) | |
options = { |
All finding details can be found in the DryRun Security Dashboard.
f1c0e88
to
c6a121a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one small nit. Approving regardless, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
63051d1
to
f618ae0
Compare
Drop support for
time_zone
inSystem settings
reason: #12974 (comment)
There are still some left calling of
get_system_setting("time_zone")
, but they will be dropped in #12995