Skip to content

Commit

Permalink
Merge pull request #222 from rkoumis/180-flask-dependency-update
Browse files Browse the repository at this point in the history
Update flask dependencies
  • Loading branch information
rkoumis authored Nov 15, 2024
2 parents b1101d3 + bec6082 commit ab4e0ea
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,10 @@ in a sort of pre-release mode.
##################

* Fixed bug with zeek processing. (#213) (#214) (#216)
* Added some unit tests. (#215)
* Added some unit tests. (#203) (#215)

3.4.2 (2024-11-15)
##################

* Updated flask dependencies (#180) (#222)
* Configure flask maximum content length
3 changes: 2 additions & 1 deletion Dockerfile-dalton
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ COPY engine-configs /opt/dalton/engine-configs
STOPSIGNAL SIGINT
EXPOSE 8080

CMD ["python", "/opt/dalton/run.py", "-c", "/opt/dalton/dalton.conf"]
# Note: if changing the next line, also look to change the command in docker-compose.yml
CMD ["flask", "--app", "app", "run", "--port=8080", "--host=0.0.0.0"]
11 changes: 5 additions & 6 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
import os

from flask import Flask
from flask_caching import Cache
from flask_compress import Compress

from app.dalton import dalton_blueprint, ensure_rulesets_exist, setup_dalton_logging
from app.flowsynth import flowsynth_blueprint, setup_flowsynth_logging

__version__ = "3.4.1"
__version__ = "3.4.2"


def create_app(test_config=None):
Expand Down Expand Up @@ -45,7 +43,8 @@ def create_app(test_config=None):
except Exception:
pass

compress = Compress()
_ = Cache(daltonfs, config={"CACHE_TYPE": "simple"})
compress.init_app(daltonfs)
# Allow the user or the agent to upload large files
daltonfs.config["MAX_CONTENT_LENGTH"] = 1024 * 1024 * 1024
daltonfs.config["MAX_FORM_MEMORY_SIZE"] = None

return daltonfs
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ services:
- no_proxy=${no_proxy}
image: dalton:latest
container_name: dalton_controller
# Uncomment the next line to run the app in debug mode
# command: flask --app app run --port=8080 --host=0.0.0.0 --debug
depends_on:
- redis
environment:
Expand Down
17 changes: 7 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,15 @@ description = "Run pcaps against an IDS"
dynamic = ["version"]
requires-python = ">=3.10"
dependencies = [
"Jinja2==3.0.3",
"Flask==1.1.1",
"Flask-Assets==0.12",
"Flask-Script==2.0.6",
"Flask-Caching==1.8.0",
"Flask-Compress==1.4.0",
"Jinja2==3.1.4",
"Flask==3.1.0",
"redis==5.2.0",
# there is newer ruamel available
"ruamel.yaml<0.18.0",
"idstools==0.6.4",
"idstools==0.6.5",
"flowsynth>=1.4.1",
"werkzeug==0.16.1",
"itsdangerous==2.0.1",
"Werkzeug==3.1.3",
"itsdangerous==2.2.0",
]
authors = [
{ name = "David Wharton and others" }
Expand Down Expand Up @@ -78,7 +75,7 @@ ignore = ["E501"]
"dalton-agent/dalton-agent.py" = ["B"]

[tool.bumpversion]
current_version = "3.4.1"
current_version = "3.4.2"

commit = true
allow_dirty = false
Expand Down

0 comments on commit ab4e0ea

Please sign in to comment.