From 8c6f9b5b16b929b724abcb1c2f3b5fa715755785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C5=BEe=20=C5=BDitnik?= <anze.zitnik@xlab.si> Date: Fri, 13 Mar 2020 18:01:33 +0100 Subject: [PATCH] Fixed useless Exception throwing in w3af. Exception is thrown in this line: https://github.com/andresriancho/w3af/blob/ecfed326f6500fbef81b6e5d56c7c37f3cb9f5b9/w3af/core/ui/api/utils/scans.py#L95 Added OSError to the catch clause. --- Dockerfile | 2 +- MANIFEST | 2 +- install/w3af-scans.py.patch | 4 ++++ install/w3af.sh | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 install/w3af-scans.py.patch diff --git a/Dockerfile b/Dockerfile index df6977c..0803766 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM ubuntu:18.04 COPY install/base.sh /tmp/install/ RUN chmod +x /tmp/install/base.sh && /tmp/install/base.sh -COPY install/requirements.txt install/w3af_output_fix.patch install/w3af-lz4.patch /tmp/ +COPY install/requirements.txt install/w3af_output_fix.patch install/w3af-lz4.patch install/w3af-scans.py.patch /tmp/ COPY install/w3af.sh /tmp/install/ RUN chmod +x /tmp/install/w3af.sh && /tmp/install/w3af.sh diff --git a/MANIFEST b/MANIFEST index 63404cf..cd8acda 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,3 +1,3 @@ -VERSION=v1.3.3 +VERSION=v1.3.4 SERVICE=vat-genscan diff --git a/install/w3af-scans.py.patch b/install/w3af-scans.py.patch new file mode 100644 index 0000000..17a5747 --- /dev/null +++ b/install/w3af-scans.py.patch @@ -0,0 +1,4 @@ +96c96 +< except (AttributeError, IOError) as _: +--- +> except (AttributeError, IOError, OSError) as _: diff --git a/install/w3af.sh b/install/w3af.sh index a4a8b35..071442a 100644 --- a/install/w3af.sh +++ b/install/w3af.sh @@ -33,4 +33,5 @@ mv w3af-1910600684c22c767a1105fbfcb051db73ad1280 /service/w3af #enable other output plugins for w3af API patch /service/w3af/w3af/core/ui/api/utils/scans.py /tmp/w3af_output_fix.patch patch /service/w3af/w3af/core/controllers/dependency_check/requirements.py /tmp/w3af-lz4.patch +patch /service/w3af/w3af/core/ui/api/utils/scans.py /tmp/w3af-scans.py.patch -- GitLab