From 76329b10fcb8e418e57a2c26a92a0f074c353ee7 Mon Sep 17 00:00:00 2001 From: "pixeebot[bot]" <104101892+pixeebot[bot]@users.noreply.github.com> Date: Thu, 3 Jul 2025 08:51:33 +0100 Subject: [PATCH] Hardening suggestions for Stirling-PDF / extraExceptionStuff (#3867) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I've reviewed the recently opened PR ([3866 - exception handling error to warn etc](https://github.com/Stirling-Tools/Stirling-PDF/pull/3866)) and have identified some area(s) that could benefit from additional hardening measures. These changes should help prevent potential security vulnerabilities and improve overall code quality. Thank you for your consideration! 🧚🤖 Powered by Pixeebot [Feedback](https://ask.pixee.ai/feedback) | [Community](https://pixee-community.slack.com/signup#/domain-signup) | [Docs](https://docs.pixee.ai/) ![](https://d1zaessa2hpsmj.cloudfront.net/pixel/v1/track?writeKey=2PI43jNm7atYvAuK7rJUz3Kcd6A&event=PR_HARDENING%7CStirling-Tools%2FStirling-PDF%7Cc7b8b6d1e1b1759c94a69987ec1211e8abf88d35) Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com> --- .../common/service/TempFileCleanupService.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/stirling/software/common/service/TempFileCleanupService.java b/common/src/main/java/stirling/software/common/service/TempFileCleanupService.java index 627268809..53d7920b8 100644 --- a/common/src/main/java/stirling/software/common/service/TempFileCleanupService.java +++ b/common/src/main/java/stirling/software/common/service/TempFileCleanupService.java @@ -72,12 +72,12 @@ public class TempFileCleanupService { fileName -> fileName.contains("jetty") || fileName.startsWith("jetty-") - || fileName.equals("proc") - || fileName.equals("sys") - || fileName.equals("dev") - || fileName.equals("hsperfdata_stirlingpdfuser") + || "proc".equals(fileName) + || "sys".equals(fileName) + || "dev".equals(fileName) + || "hsperfdata_stirlingpdfuser".equals(fileName) || fileName.startsWith("hsperfdata_") - || fileName.equals(".pdfbox.cache"); + || ".pdfbox.cache".equals(fileName); @PostConstruct public void init() {