Skip to content

Commit 5876999

Browse files
committed
django 5 fixes + free_space_monitor
1 parent 8c6ff0a commit 5876999

File tree

6 files changed

+22
-5
lines changed

6 files changed

+22
-5
lines changed

lib/cuckoo/core/scheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def is_short_on_disk_space(self):
250250
# Resolve the full base path to the analysis folder, just in
251251
# case somebody decides to make a symbolic link out of it.
252252
dir_path = os.path.join(CUCKOO_ROOT, "storage", "analyses")
253-
need_space, space_available = free_space_monitor(dir_path, return_value=True, analysis=True)
253+
need_space, space_available = free_space_monitor(dir_path, analysis=True)
254254
if need_space:
255255
log.error(
256256
"Not enough free disk space! (Only %d MB!). You can change limits it in cuckoo.conf -> freespace", space_available

modules/processing/analysisinfo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import codecs
66
import logging
7-
import os
87
import time
98
from contextlib import suppress
109
from datetime import datetime

poetry.lock

Lines changed: 17 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ bs4 = "0.0.1"
5353
pydeep2 = "0.5.1"
5454
django-recaptcha = "4.0.0" # https://pypi.org/project/django-recaptcha/
5555
django-crispy-forms = "2.3"
56+
crispy-bootstrap4 = "2024.10"
5657
django-settings-export = "1.2.1"
5758
django-csp = "3.8"
5859
django-extensions = "3.2.3"

utils/process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def autoprocess(
320320
# If not enough free disk space is available, then we print an
321321
# error message and wait another round (this check is ignored
322322
# when the freespace configuration variable is set to zero).
323-
if cfg.cuckoo.freespace:
323+
if cfg.cuckoo.freespace_processing:
324324
# Resolve the full base path to the analysis folder, just in
325325
# case somebody decides to make a symbolic link out of it.
326326
dir_path = os.path.join(CUCKOO_ROOT, "storage", "analyses")

web/web/settings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@
265265
# "allauth.socialaccount.providers.google",
266266
# "allauth.socialaccount.providers.microsoft",
267267
"crispy_forms",
268+
"crispy_bootstrap4",
268269
"django_recaptcha", # https://pypi.org/project/django-recaptcha/
269270
"rest_framework",
270271
"rest_framework.authtoken",
@@ -340,7 +341,7 @@
340341

341342
ACCOUNT_EMAIL_REQUIRED = web_cfg.registration.get("email_required", False)
342343
ACCOUNT_EMAIL_SUBJECT_PREFIX = web_cfg.registration.get("email_prefix_subject", False)
343-
ACCOUNT_RATE_LIMITS = {"login_failed": 3}
344+
ACCOUNT_RATE_LIMITS = {"login_failed": "3/m"}
344345
LOGIN_REDIRECT_URL = "/"
345346
ACCOUNT_LOGOUT_REDIRECT_URL = "/accounts/login/"
346347
MANUAL_APPROVE = web_cfg.registration.get("manual_approve", False)

0 commit comments

Comments
 (0)