From c69146bec12af2b2a469a22d971510107b678568 Mon Sep 17 00:00:00 2001 From: whikernel Date: Fri, 13 Dec 2024 10:31:47 +0100 Subject: [PATCH 1/7] [FIX] User logout in local host --- source/app/blueprints/dashboard/dashboard_routes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/app/blueprints/dashboard/dashboard_routes.py b/source/app/blueprints/dashboard/dashboard_routes.py index 9f45c927a..4385ac92c 100644 --- a/source/app/blueprints/dashboard/dashboard_routes.py +++ b/source/app/blueprints/dashboard/dashboard_routes.py @@ -100,8 +100,9 @@ def logout(): log.error(f"Error logging out: {e}") log.warning(f'Will continue to local logout') + track_activity("user '{}' is being logged-out".format(current_user.user), ctx_less=True, display_in_ui=False) + logout_user() - track_activity("user '{}' has been logged-out".format(current_user.user), ctx_less=True, display_in_ui=False) session.clear() return redirect(not_authenticated_redirection_url('/')) From b9e2e41b7064f597d09a929e3345f9abff70601f Mon Sep 17 00:00:00 2001 From: whikernel Date: Mon, 16 Dec 2024 08:25:17 +0100 Subject: [PATCH 2/7] [FIX] Logout of users in local auth --- source/app/blueprints/dashboard/dashboard_routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/app/blueprints/dashboard/dashboard_routes.py b/source/app/blueprints/dashboard/dashboard_routes.py index 4385ac92c..31379d921 100644 --- a/source/app/blueprints/dashboard/dashboard_routes.py +++ b/source/app/blueprints/dashboard/dashboard_routes.py @@ -86,7 +86,7 @@ def logout(): try: logout_request = oidc_client.construct_EndSessionRequest(state=session["oidc_state"]) logout_url = logout_request.request(oidc_client.provider_info["end_session_endpoint"]) - track_activity("user '{}' has been logged-out".format(current_user.user), ctx_less=True, display_in_ui=False) + track_activity("user '{}' is being logged out".format(current_user.user), ctx_less=True, display_in_ui=False) logout_user() session.clear() return redirect(logout_url) @@ -100,7 +100,7 @@ def logout(): log.error(f"Error logging out: {e}") log.warning(f'Will continue to local logout') - track_activity("user '{}' is being logged-out".format(current_user.user), ctx_less=True, display_in_ui=False) + track_activity("user '{}' is being logged out".format(current_user.user), ctx_less=True, display_in_ui=False) logout_user() session.clear() From 0e512679eaf2e8aa8c16280059f490d2915dbc4a Mon Sep 17 00:00:00 2001 From: whikernel Date: Mon, 16 Dec 2024 08:32:24 +0100 Subject: [PATCH 3/7] [#665][FIX] Anticipated fixe https://github.com/dfir-iris/iris-web/pull/667 --- source/app/configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/app/configuration.py b/source/app/configuration.py index 6a65ac933..9b4dc093c 100644 --- a/source/app/configuration.py +++ b/source/app/configuration.py @@ -289,7 +289,7 @@ class Config: IRIS_ADM_USERNAME = config.load('IRIS', 'ADM_USERNAME') IRIS_ADM_API_KEY = config.load('IRIS', 'ADM_API_KEY') - PERMANENT_SESSION_LIFETIME = timedelta(minutes=config.load('IRIS', 'SESSION_TIMEOUT', fallback=1440)) + PERMANENT_SESSION_LIFETIME = timedelta(minutes=int(config.load('IRIS', 'SESSION_TIMEOUT', fallback=1440))) SESSION_COOKIE_SAMESITE = 'Lax' SESSION_COOKIE_SECURE = True MFA_ENABLED = config.load('IRIS', 'MFA_ENABLED', fallback=False) == 'True' From 8a1f67d724827ad93af1dc282ea9f81e46d31f12 Mon Sep 17 00:00:00 2001 From: whikernel Date: Tue, 17 Dec 2024 09:38:53 +0100 Subject: [PATCH 4/7] [UPD] Updated to Python 3.12 --- docker/webApp/Dockerfile | 4 +-- docker/webApp/iris-entrypoint.sh | 2 +- source/app/__init__.py | 11 +++---- .../app/blueprints/graphql/graphql_route.py | 6 ++++ source/app/configuration.py | 1 + source/app/flask_dropzone/__init__.py | 2 +- .../docx_generator-0.8.0-py3-none-any.whl | Bin 23759 -> 23751 bytes source/requirements.txt | 31 +++++++++--------- source/run.py | 2 +- 9 files changed, 32 insertions(+), 27 deletions(-) diff --git a/docker/webApp/Dockerfile b/docker/webApp/Dockerfile index 34ddba730..d80a424a1 100644 --- a/docker/webApp/Dockerfile +++ b/docker/webApp/Dockerfile @@ -20,7 +20,7 @@ ################# # COMPILE IMAGE # ################# -FROM python:3.9 AS compile-image +FROM python:3.12 AS compile-image RUN apt-get update RUN python -m venv /opt/venv @@ -35,7 +35,7 @@ RUN pip3 install -r requirements.txt ############### # BUILD IMAGE # ############### -FROM python:3.9 as iriswebapp +FROM python:3.12 as iriswebapp ENV PYTHONUNBUFFERED=1 DOCKERIZED=1 COPY --from=compile-image /opt/venv /opt/venv diff --git a/docker/webApp/iris-entrypoint.sh b/docker/webApp/iris-entrypoint.sh index 8ca0a64bc..68357b553 100755 --- a/docker/webApp/iris-entrypoint.sh +++ b/docker/webApp/iris-entrypoint.sh @@ -28,7 +28,7 @@ printf "Running ${target} ...\n" if [[ "${target}" == iris-worker ]] ; then celery -A app.celery worker -E -B -l INFO & else - gunicorn app:app --worker-class eventlet --bind 0.0.0.0:8000 --timeout 180 --worker-connections 1000 --log-level=info & + gunicorn app:app --bind 0.0.0.0:8000 --timeout 180 --worker-connections 1000 --threads 100 -w 1 --log-level=info & fi while true; do sleep 2; done diff --git a/source/app/__init__.py b/source/app/__init__.py index f92449f88..1bdfb1808 100644 --- a/source/app/__init__.py +++ b/source/app/__init__.py @@ -29,7 +29,6 @@ from flask_socketio import SocketIO, Namespace from flask_sqlalchemy import SQLAlchemy from functools import partial -from sqlalchemy_imageattach.stores.fs import HttpExposedFileSystemStore from werkzeug.middleware.proxy_fix import ProxyFix from app.flask_dropzone import Dropzone @@ -116,13 +115,13 @@ def ac_current_user_has_manage_perms(): celery = make_celery(app) -store = HttpExposedFileSystemStore( - path='images', - prefix='/static/assets/images/' -) +# store = HttpExposedFileSystemStore( +# path='images', +# prefix='/static/assets/images/' +# ) app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1) -app.wsgi_app = store.wsgi_middleware(app.wsgi_app) +#app.wsgi_app = store.wsgi_middleware(app.wsgi_app) socket_io = SocketIO(app, cors_allowed_origins="*") diff --git a/source/app/blueprints/graphql/graphql_route.py b/source/app/blueprints/graphql/graphql_route.py index 42e0ca987..8bbd587b1 100644 --- a/source/app/blueprints/graphql/graphql_route.py +++ b/source/app/blueprints/graphql/graphql_route.py @@ -49,6 +49,12 @@ from app.blueprints.graphql.cases import CaseUpdate from app.blueprints.graphql.cases import CaseConnection +import warnings + +# Ignore all UserWarnings +warnings.filterwarnings("ignore", category=UserWarning) + + class Query(ObjectType): """This is the IRIS GraphQL queries documentation!""" diff --git a/source/app/configuration.py b/source/app/configuration.py index 9b4dc093c..20ea79dbb 100644 --- a/source/app/configuration.py +++ b/source/app/configuration.py @@ -259,6 +259,7 @@ class CeleryConfig: result_extended = True result_serializer = "json" worker_pool_restarts = True + broker_connection_retry_on_startup =True # --------- APP --------- diff --git a/source/app/flask_dropzone/__init__.py b/source/app/flask_dropzone/__init__.py index 19abc0d0a..ef84ce27d 100644 --- a/source/app/flask_dropzone/__init__.py +++ b/source/app/flask_dropzone/__init__.py @@ -9,7 +9,7 @@ """ import warnings from flask import Blueprint -from flask import Markup +from markupsafe import Markup from flask import current_app from flask import render_template_string from flask import url_for diff --git a/source/dependencies/docx_generator-0.8.0-py3-none-any.whl b/source/dependencies/docx_generator-0.8.0-py3-none-any.whl index b6248c719bdaa674915ee9d78cec079903e7967a..8d2fca53e90724cea936d1bdda32acbd0463586e 100644 GIT binary patch delta 1609 zcmY+Edo6)tEK;#G zR>&=(qO6mm+%hWin{vNo`c1#nAD(mG=lML(d7jU6&hwn}>ZudytP^3bpv3$zSH0K* z6lDu!<24qRZUPnofm(#p1x7JiK$Q!a8j+26Y=bE#eV@~xmCUKiU4c~Sogl%wCb&3s zgMYyX69Y3Ef8>(6UF)lYHrmptS?F^G`fyM$PdpZO(ai$br@sJ73q8xebdDfa{U&A+ z)jiHAWZ55y3#->*qAnnH&}W$GwP*jm8Z)!kLNuzW8^?BPI4(Lx%vS~^ND z*4^@Y`mO!%M`&@#0v}Rj3IllEnSBv#>N`Ctjmwwl0P$Mqd;RMk>%WZ9BqiUE&k9P} zz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!d4`HT!hLS~_)v0VkWk+|BPOQ)BX0kjlO6o9 z?+?Q#W!vX2D5tXc^TC@;!ddYF1o=%>K`b~~9OFq8bGTF*ZeRWhkE1^1$-a7r`Q@29 z$`B8Dnjjh8MBeFlm}7*-Xp^GKjDR2f@^*TM63ulJn`|-SQ9sM3&{uamA9F(Bxl3_IcdcSUk*E^#gmC988Meh8`i-8%Hv-!jIajg n6Clh$f9*AR%_V98K)DtGVETnzxvNwf{(-svP>tt4t3Q7Ofwl4% diff --git a/source/requirements.txt b/source/requirements.txt index b4209c480..ecb4bf0b8 100644 --- a/source/requirements.txt +++ b/source/requirements.txt @@ -1,28 +1,27 @@ azure-identity==1.10.0 azure-keyvault-secrets==4.5.1 -celery==5.2.7 -Flask==2.3.2 +celery==5.4.0 +Flask==3.1.0 Flask-Bcrypt==1.0.1 -Flask-Login==0.6.2 -Flask-SQLAlchemy==3.0.2 -Flask-WTF==1.1.1 -flask-marshmallow==0.14.0 -Flask-Caching==1.10.1 -marshmallow==3.20.1 -marshmallow-sqlalchemy==0.30.0 -gunicorn==20.1.0 +Flask-Login==0.6.3 +Flask-SQLAlchemy==3.1.1 +Flask-WTF==1.2.2 +flask-marshmallow==1.2.1 +Flask-Caching==2.3.0 +marshmallow==3.23.1 +marshmallow-sqlalchemy==1.1.0 +gunicorn==23.0.0 psycopg2-binary==2.9.10 pyunpack==0.2.2 packaging==21.3 requests==2.31.0 -SQLAlchemy==2.0.24 +SQLAlchemy==2.0.36 SQLAlchemy-ImageAttach==1.1.0 -SQLAlchemy-Utils==0.41.1 +SQLAlchemy-Utils==0.41.2 urllib3==1.26.18 -Werkzeug==2.3.7 -WTForms==2.2.1 -flask-socketio==5.1.1 -eventlet==0.30.2 +Werkzeug==3.1.3 +WTForms==3.2.1 +Flask-SocketIO==5.4.1 alembic==1.7.5 setuptools~=70.3.0 python-dateutil==2.8.2 diff --git a/source/run.py b/source/run.py index 32dbe6204..d3dccd4e7 100644 --- a/source/run.py +++ b/source/run.py @@ -27,5 +27,5 @@ if __name__ == "__main__": - socket_io.run(app, host='127.0.0.1', port=8000, debug=True) + socket_io.run(app, host='127.0.0.1', port=8000, debug=True, allow_unsafe_werkzeug=True) From 06e182991ec3fef84ef4655d935a1f562fa16f39 Mon Sep 17 00:00:00 2001 From: whikernel Date: Fri, 20 Dec 2024 16:44:34 +0100 Subject: [PATCH 5/7] [REV] Revert "[UPD] Updated to Python 3.12" This reverts commit 8a1f67d724827ad93af1dc282ea9f81e46d31f12. --- docker/webApp/Dockerfile | 4 +-- docker/webApp/iris-entrypoint.sh | 2 +- source/app/__init__.py | 11 ++++--- .../app/blueprints/graphql/graphql_route.py | 6 ---- source/app/configuration.py | 1 - source/app/flask_dropzone/__init__.py | 2 +- .../docx_generator-0.8.0-py3-none-any.whl | Bin 23751 -> 23759 bytes source/requirements.txt | 31 +++++++++--------- source/run.py | 2 +- 9 files changed, 27 insertions(+), 32 deletions(-) diff --git a/docker/webApp/Dockerfile b/docker/webApp/Dockerfile index d80a424a1..34ddba730 100644 --- a/docker/webApp/Dockerfile +++ b/docker/webApp/Dockerfile @@ -20,7 +20,7 @@ ################# # COMPILE IMAGE # ################# -FROM python:3.12 AS compile-image +FROM python:3.9 AS compile-image RUN apt-get update RUN python -m venv /opt/venv @@ -35,7 +35,7 @@ RUN pip3 install -r requirements.txt ############### # BUILD IMAGE # ############### -FROM python:3.12 as iriswebapp +FROM python:3.9 as iriswebapp ENV PYTHONUNBUFFERED=1 DOCKERIZED=1 COPY --from=compile-image /opt/venv /opt/venv diff --git a/docker/webApp/iris-entrypoint.sh b/docker/webApp/iris-entrypoint.sh index 68357b553..8ca0a64bc 100755 --- a/docker/webApp/iris-entrypoint.sh +++ b/docker/webApp/iris-entrypoint.sh @@ -28,7 +28,7 @@ printf "Running ${target} ...\n" if [[ "${target}" == iris-worker ]] ; then celery -A app.celery worker -E -B -l INFO & else - gunicorn app:app --bind 0.0.0.0:8000 --timeout 180 --worker-connections 1000 --threads 100 -w 1 --log-level=info & + gunicorn app:app --worker-class eventlet --bind 0.0.0.0:8000 --timeout 180 --worker-connections 1000 --log-level=info & fi while true; do sleep 2; done diff --git a/source/app/__init__.py b/source/app/__init__.py index 1bdfb1808..f92449f88 100644 --- a/source/app/__init__.py +++ b/source/app/__init__.py @@ -29,6 +29,7 @@ from flask_socketio import SocketIO, Namespace from flask_sqlalchemy import SQLAlchemy from functools import partial +from sqlalchemy_imageattach.stores.fs import HttpExposedFileSystemStore from werkzeug.middleware.proxy_fix import ProxyFix from app.flask_dropzone import Dropzone @@ -115,13 +116,13 @@ def ac_current_user_has_manage_perms(): celery = make_celery(app) -# store = HttpExposedFileSystemStore( -# path='images', -# prefix='/static/assets/images/' -# ) +store = HttpExposedFileSystemStore( + path='images', + prefix='/static/assets/images/' +) app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1) -#app.wsgi_app = store.wsgi_middleware(app.wsgi_app) +app.wsgi_app = store.wsgi_middleware(app.wsgi_app) socket_io = SocketIO(app, cors_allowed_origins="*") diff --git a/source/app/blueprints/graphql/graphql_route.py b/source/app/blueprints/graphql/graphql_route.py index 8bbd587b1..42e0ca987 100644 --- a/source/app/blueprints/graphql/graphql_route.py +++ b/source/app/blueprints/graphql/graphql_route.py @@ -49,12 +49,6 @@ from app.blueprints.graphql.cases import CaseUpdate from app.blueprints.graphql.cases import CaseConnection -import warnings - -# Ignore all UserWarnings -warnings.filterwarnings("ignore", category=UserWarning) - - class Query(ObjectType): """This is the IRIS GraphQL queries documentation!""" diff --git a/source/app/configuration.py b/source/app/configuration.py index 20ea79dbb..9b4dc093c 100644 --- a/source/app/configuration.py +++ b/source/app/configuration.py @@ -259,7 +259,6 @@ class CeleryConfig: result_extended = True result_serializer = "json" worker_pool_restarts = True - broker_connection_retry_on_startup =True # --------- APP --------- diff --git a/source/app/flask_dropzone/__init__.py b/source/app/flask_dropzone/__init__.py index ef84ce27d..19abc0d0a 100644 --- a/source/app/flask_dropzone/__init__.py +++ b/source/app/flask_dropzone/__init__.py @@ -9,7 +9,7 @@ """ import warnings from flask import Blueprint -from markupsafe import Markup +from flask import Markup from flask import current_app from flask import render_template_string from flask import url_for diff --git a/source/dependencies/docx_generator-0.8.0-py3-none-any.whl b/source/dependencies/docx_generator-0.8.0-py3-none-any.whl index 8d2fca53e90724cea936d1bdda32acbd0463586e..b6248c719bdaa674915ee9d78cec079903e7967a 100644 GIT binary patch delta 1635 zcmZXUeKZq#7{`ZsX|w2U?(LS>snN8ph0sl64fC?REH!VTqPxu1yoD_zLNBhRQM#dZ zO>;Dx5?3UmCFY&WnwP}1bThY&E7!$6oqM|Xch2|xp5OU>&Uv2m{PAh6Q4!Us@D?0_ z#<36l1WS%I(1z7&MKl_Ul_PT}ia6`+I9EK_(Z7yjlO@IYZO7k8twF|N)hS!w zfavu^={EVN$%Ka-t3E}dApze971ORXGGdCe>3>)|#x|r|_+GhMSN(XrTzjNfq7wQfDIegXXo5AK`XZ1iYv)T zy@^wLPR~Db*3dj>$#=yo^~+h5LF*0+95I0%EX?m$jz?=?Ui@-7S(SiS18xQY09t_6 ztrg!xfAC*KXwPlhz9V~KoZ|{QOEzCP!i3DD#Ud(8;XFJ})6(L0Oy_{Wzh~1e; z&9Wn%s7}nIPE6MX=%onR^$F1rfm^t?3*Go$a5HoFw;&g{YA-lvZ-0B62;b-aiaRl` z3i!HzNaMK!8&-PjtOT)=FiL2A5R*nYv~G2}tpYKii76yt=*;_mx)+tdS0CIm$CIiv zwK&?0qVH747%!yiz@<+!T+X{kFZqey6s$OH-XnUCT+GfaMX6a{I5P5d0QE{%r_;nz zFsK=qiV7OilI@PZAy?wSr9FM;3(c@Wyrze*3%n4K$3U;M*6p=AlQG(mE20opke`fU50ml}n*L#$rIbePuX~yc3cdJ5A zkt4D~Ut7rf!5_4Ie0ovBs~`cVT;ygAWIp17fI^3vKhov0Co?xy|7I2$lnCgwvt{95 zOPrxln|`$X3~M_%?Wy0NWzDDwq4j4zbyzSIUZhX_96?iTL&La+!!V*RyOkE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`>1?)E`%DxBx(^0{bbjA*4J$>BtaMOJ{JQiAVKX8< z9Or{T?E#w;G!;|ki|Ebk(d?X`S2|2zsE992_+(gt+qXg0;5GDV_ zh*)8rpn?{(@e2~SF}f@Z2O96V0S7*#T(Yj8B7z~!45_HD&Z4GcF<^lb^)neij4kJ@ zWIY_|eeC0DOqDYv+e|7CJDEom^z?VX>5bNgm0^#kAhCa%n1;bq5xHaUKAz=JuJz|V zs_AeVwmrZ@XHs4_I^N|=4m~-md98h>eC?LY+xrg9*?QE;Lg-jp`-xL*ps@73h(=_< z-tGCd5GU=LSN;r@n$?GTSEN z28$yDo*T+LX!N_Te-||O#YL|E?CSJINVp%wdsUDg^da2=ba_7$F?E|U(c$Cy_xWC# z@J>U^1nQ{R%r7lL*gB`LRM{ubUZ$i$)3xz!F!@W&<$$6O;nKJ8O6H6TaE4ygbA)z= zm1$-7YAFaMT}aCMPMTon9`~7pA#%sL#&_LN ziq4j%d}~I@^wt}DxYAyD!CLnay&*D`(jz`Wt%s(PwA&kLd+eLU^D)n07EraQLG#vA z&eA$V5Fk2W&L-uEvdyu)I_0|8bG}knFw>oL51@Dt>_c$sXKTvq}q#IGmCRkp*#;0hnm{(XN&vnOpdbhz3%7& z8Z&mXtR>>Ch-I%cHcmk=gg^5r{GSBoAuK%pz)jn)vBdr9?>|kt6uFkn96rO?smjjM zm|tIwxysaOW!iyP7ohBRH#dpj^aj*%ZZezT4N!1LH8ufCNC|DB{#Y5U2?J!~GyzF( o$p3$+dG8Rx0omSKLWHR9-ss(gk3Wqkdmax@{!?11l})P5=M^ diff --git a/source/requirements.txt b/source/requirements.txt index ecb4bf0b8..b4209c480 100644 --- a/source/requirements.txt +++ b/source/requirements.txt @@ -1,27 +1,28 @@ azure-identity==1.10.0 azure-keyvault-secrets==4.5.1 -celery==5.4.0 -Flask==3.1.0 +celery==5.2.7 +Flask==2.3.2 Flask-Bcrypt==1.0.1 -Flask-Login==0.6.3 -Flask-SQLAlchemy==3.1.1 -Flask-WTF==1.2.2 -flask-marshmallow==1.2.1 -Flask-Caching==2.3.0 -marshmallow==3.23.1 -marshmallow-sqlalchemy==1.1.0 -gunicorn==23.0.0 +Flask-Login==0.6.2 +Flask-SQLAlchemy==3.0.2 +Flask-WTF==1.1.1 +flask-marshmallow==0.14.0 +Flask-Caching==1.10.1 +marshmallow==3.20.1 +marshmallow-sqlalchemy==0.30.0 +gunicorn==20.1.0 psycopg2-binary==2.9.10 pyunpack==0.2.2 packaging==21.3 requests==2.31.0 -SQLAlchemy==2.0.36 +SQLAlchemy==2.0.24 SQLAlchemy-ImageAttach==1.1.0 -SQLAlchemy-Utils==0.41.2 +SQLAlchemy-Utils==0.41.1 urllib3==1.26.18 -Werkzeug==3.1.3 -WTForms==3.2.1 -Flask-SocketIO==5.4.1 +Werkzeug==2.3.7 +WTForms==2.2.1 +flask-socketio==5.1.1 +eventlet==0.30.2 alembic==1.7.5 setuptools~=70.3.0 python-dateutil==2.8.2 diff --git a/source/run.py b/source/run.py index d3dccd4e7..32dbe6204 100644 --- a/source/run.py +++ b/source/run.py @@ -27,5 +27,5 @@ if __name__ == "__main__": - socket_io.run(app, host='127.0.0.1', port=8000, debug=True, allow_unsafe_werkzeug=True) + socket_io.run(app, host='127.0.0.1', port=8000, debug=True) From a36cd0ee78d76424cbe4bc5690166a57dab0850b Mon Sep 17 00:00:00 2001 From: whikernel Date: Fri, 20 Dec 2024 17:16:19 +0100 Subject: [PATCH 6/7] [FIX] UI issue with IOC without TLPs --- source/app/datamgmt/case/case_iocs_db.py | 2 +- source/app/static/assets/js/iris/case.ioc.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/app/datamgmt/case/case_iocs_db.py b/source/app/datamgmt/case/case_iocs_db.py index e371eab79..8bedca96f 100644 --- a/source/app/datamgmt/case/case_iocs_db.py +++ b/source/app/datamgmt/case/case_iocs_db.py @@ -146,7 +146,7 @@ def get_detailed_iocs(caseid): IocLink.ioc_id == Ioc.ioc_id) ).join(IocLink.ioc) .join(Ioc.ioc_type) - .join(Ioc.tlp) + .outerjoin(Ioc.tlp) .order_by(IocType.type_name).all()) return detailed_iocs diff --git a/source/app/static/assets/js/iris/case.ioc.js b/source/app/static/assets/js/iris/case.ioc.js index ad4b5d0ec..cadc4aa14 100644 --- a/source/app/static/assets/js/iris/case.ioc.js +++ b/source/app/static/assets/js/iris/case.ioc.js @@ -433,8 +433,12 @@ $(document).ready(function(){ "data": "tlp_name", "render": function(data, type, row, meta) { if (type === 'display') { - data = sanitizeHTML(data); - data = 'tlp:' + data + ''; + if (data) { + data = sanitizeHTML(data); + data = 'tlp:' + data + ''; + } else { + return `unspecified` + } } return data; } From 220b54da6ceb627b35732cdc23d4786eada8ae4f Mon Sep 17 00:00:00 2001 From: whikernel Date: Fri, 20 Dec 2024 17:20:31 +0100 Subject: [PATCH 7/7] =?UTF-8?q?Bump=20version:=202.4.18=20=E2=86=92=202.4.?= =?UTF-8?q?19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- README.md | 4 ++-- docker-compose.yml | 8 ++++---- source/app/configuration.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 42b0c1d83..4bb62d78c 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.4.18 +current_version = 2.4.19 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)(-(?P.*)-(?P\d+))? diff --git a/README.md b/README.md index 2883a7191..1d7e85ad4 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@

Incident Response Investigation System
- Current Version v2.4.18 + Current Version v2.4.19
Online Demonstration

@@ -52,7 +52,7 @@ git clone https://github.com/dfir-iris/iris-web.git cd iris-web # Checkout to the last tagged version -git checkout v2.4.18 +git checkout v2.4.19 # Copy the environment file cp .env.model .env diff --git a/docker-compose.yml b/docker-compose.yml index 1e3f01341..fa6723434 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,27 +25,27 @@ services: extends: file: docker-compose.base.yml service: db - image: ${DB_IMAGE_NAME:-ghcr.io/dfir-iris/iriswebapp_db}:${DB_IMAGE_TAG:-v2.4.18} + image: ${DB_IMAGE_NAME:-ghcr.io/dfir-iris/iriswebapp_db}:${DB_IMAGE_TAG:-v2.4.19} app: extends: file: docker-compose.base.yml service: app - image: ${APP_IMAGE_NAME:-ghcr.io/dfir-iris/iriswebapp_app}:${APP_IMAGE_TAG:-v2.4.18} + image: ${APP_IMAGE_NAME:-ghcr.io/dfir-iris/iriswebapp_app}:${APP_IMAGE_TAG:-v2.4.19} worker: extends: file: docker-compose.base.yml service: worker - image: ${APP_IMAGE_NAME:-ghcr.io/dfir-iris/iriswebapp_app}:${APP_IMAGE_TAG:-v2.4.18} + image: ${APP_IMAGE_NAME:-ghcr.io/dfir-iris/iriswebapp_app}:${APP_IMAGE_TAG:-v2.4.19} nginx: extends: file: docker-compose.base.yml service: nginx - image: ${NGINX_IMAGE_NAME:-ghcr.io/dfir-iris/iriswebapp_nginx}:${NGINX_IMAGE_TAG:-v2.4.18} + image: ${NGINX_IMAGE_NAME:-ghcr.io/dfir-iris/iriswebapp_nginx}:${NGINX_IMAGE_TAG:-v2.4.19} volumes: diff --git a/source/app/configuration.py b/source/app/configuration.py index 9b4dc093c..fd5d9be0f 100644 --- a/source/app/configuration.py +++ b/source/app/configuration.py @@ -264,7 +264,7 @@ class CeleryConfig: # --------- APP --------- class Config: # Handled by bumpversion - IRIS_VERSION = "v2.4.18" # DO NOT EDIT THIS LINE MANUALLY + IRIS_VERSION = "v2.4.19" # DO NOT EDIT THIS LINE MANUALLY if os.environ.get('IRIS_DEMO_VERSION') is not None and os.environ.get('IRIS_DEMO_VERSION') != 'None': IRIS_VERSION = os.environ.get('IRIS_DEMO_VERSION')