From ba5abe010d62cba26a460fc7882e23d1190b1209 Mon Sep 17 00:00:00 2001 From: Arshan Dabirsiaghi Date: Wed, 11 Dec 2024 17:45:32 -0500 Subject: [PATCH 1/3] add another api for easy integration when the type is unknown --- src/main/java/io/github/pixee/security/Newlines.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/io/github/pixee/security/Newlines.java b/src/main/java/io/github/pixee/security/Newlines.java index 76d6449..ce36692 100644 --- a/src/main/java/io/github/pixee/security/Newlines.java +++ b/src/main/java/io/github/pixee/security/Newlines.java @@ -17,4 +17,14 @@ public static String stripAll(final String value) { } return value.replace("\r", "").replace("\n", ""); } + + /** + * Removes newlines from the given string, if any exist. + * + * @param value the given string to sanitize + * @return a {@link String} identical to the one given, without newline characters + */ + public static String stripAll(final Object value) { + return stripAll(String.valueOf(value)); + } } From 9ba4684b0a26c314e5955094718a3f38d071df2d Mon Sep 17 00:00:00 2001 From: Arshan Dabirsiaghi Date: Wed, 11 Dec 2024 21:56:16 -0500 Subject: [PATCH 2/3] update upload action --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 33f43ef..ccc68db 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,7 @@ jobs: git push fi - name: "Upload JaCoCo coverage report" - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: jacoco-report path: build/reports/jacoco/test/html/ From a2215e10d68fac74531a64c1dff195c01da5f1e4 Mon Sep 17 00:00:00 2001 From: Jacoco Coverage Update Action Date: Thu, 12 Dec 2024 02:58:31 +0000 Subject: [PATCH 3/3] Autogenerated JaCoCo coverage badge --- .github/badges/jacoco.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/badges/jacoco.svg b/.github/badges/jacoco.svg index e6c7d3c..65ea9eb 100644 --- a/.github/badges/jacoco.svg +++ b/.github/badges/jacoco.svg @@ -1 +1 @@ -coverage81.3% \ No newline at end of file +coverage81.2% \ No newline at end of file