From ddc2daea525665fd4bcc10ff01e2915fe49c97ef Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Tue, 27 May 2025 17:25:41 +0100 Subject: [PATCH] security fixes (#3587) # Description of Changes Please provide a summary of the changes, including: - What was changed - Why the change was made - Any challenges encountered Closes #(issue_number) --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [ ] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing) for more details. --- Dockerfile | 2 +- Dockerfile.dev | 1 + Dockerfile.fat | 2 +- build.gradle | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6a854f35e..68c50976f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -73,7 +73,7 @@ RUN echo "@main https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/a py3-pillow@testing \ py3-pdf2image@testing && \ python3 -m venv /opt/venv && \ - /opt/venv/bin/pip install --upgrade pip && \ + /opt/venv/bin/pip install --upgrade pip setuptools && \ /opt/venv/bin/pip install --no-cache-dir --upgrade unoserver weasyprint && \ ln -s /usr/lib/libreoffice/program/uno.py /opt/venv/lib/python3.12/site-packages/ && \ ln -s /usr/lib/libreoffice/program/unohelper.py /opt/venv/lib/python3.12/site-packages/ && \ diff --git a/Dockerfile.dev b/Dockerfile.dev index dbfdfc89c..37571373e 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -32,6 +32,7 @@ ENV SETUPTOOLS_USE_DISTUTILS=local # Installation der benötigten Python-Pakete RUN python3 -m venv --system-site-packages /opt/venv \ && . /opt/venv/bin/activate \ + && pip install --upgrade pip setuptools \ && pip install --no-cache-dir WeasyPrint pdf2image pillow unoserver opencv-python-headless pre-commit # Füge den venv-Pfad zur globalen PATH-Variable hinzu, damit die Tools verfügbar sind diff --git a/Dockerfile.fat b/Dockerfile.fat index ef19ebde7..6d23809a8 100644 --- a/Dockerfile.fat +++ b/Dockerfile.fat @@ -83,7 +83,7 @@ RUN echo "@main https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/a py3-pillow@testing \ py3-pdf2image@testing && \ python3 -m venv /opt/venv && \ - /opt/venv/bin/pip install --upgrade pip && \ + /opt/venv/bin/pip install --upgrade pip setuptools && \ /opt/venv/bin/pip install --no-cache-dir --upgrade unoserver weasyprint && \ ln -s /usr/lib/libreoffice/program/uno.py /opt/venv/lib/python3.12/site-packages/ && \ ln -s /usr/lib/libreoffice/program/unohelper.py /opt/venv/lib/python3.12/site-packages/ && \ diff --git a/build.gradle b/build.gradle index ad82dfabb..e6444c8c8 100644 --- a/build.gradle +++ b/build.gradle @@ -520,6 +520,7 @@ dependencies { exclude group: "org.slf4j", module: "slf4j-simple" exclude group: "org.bouncycastle", module: "bcprov-jdk15on" exclude group: "com.google.code.gson", module: "gson" + exclude group: "commons-io", module: "commons-io" } implementation 'org.apache.pdfbox:jbig2-imageio:3.0.4'