Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

Add a Match Case option to auto-redact, off by default (#8452)

EthanHealy01fe5f51f52c40
diff --git a/app/core/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java b/app/core/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java
index 92448533c5..8254ec4afe 100644
--- a/app/core/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java
+++ b/app/core/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java
@@ -175,6 +175,7 @@ public class RedactController {
boolean useRegex = Boolean.TRUE.equals(request.getUseRegex());
boolean wholeWordSearchBool = Boolean.TRUE.equals(request.getWholeWordSearch());
+ boolean caseSensitive = Boolean.TRUE.equals(request.getCaseSensitive());
if (useRegex) {
for (String term : terms) {
@@ -216,6 +217,7 @@ public class RedactController {
.addWords(terms)
.useRegex(useRegex)
.wholeWord(wholeWordSearchBool)
+ .caseSensitive(caseSensitive)
.boxColor(boxColorInt)
.padding(request.getCustomPadding())
.removeContent(true)
@@ -275,7 +277,8 @@ public class RedactController {
document,
terms.toArray(new String[0]),
useRegex,
- wholeWordSearchBool);
+ wholeWordSearchBool,
+ caseSensitive);
TempFile finalized =
manualRedactionService.finalizeRedaction(
document,
diff --git a/app/core/src/main/java/stirling/software/SPDF/controller/api/security/TextRedactionService.java b/app/core/src/main/java/stirling/software/SPDF/controller/api/security/TextRedactionService.java
index 7b0016bbf7..2d3a511f36 100644
--- a/app/core/src/main/java/stirling/software/SPDF/controller/api/security/TextRedactionService.java
+++ b/app/core/src/main/java/stirling/software/SPDF/controller/api/security/TextRedactionService.java
@@ -65,6 +65,15 @@ class TextRedactionService {
Map<Integer, List<PDFText>> findTextToRedact(
PDDocument document, String[] listOfText, boolean useRegex, boolean wholeWordSearch) {
+ return findTextToRedact(document, listOfText, useRegex, wholeWordSearch, false);
+ }
+
+ Map<Integer, List<PDFText>> findTextToRedact(
+ PDDocument document,
+ String[] listOfText,
+ boolean useRegex,
+ boolean wholeWordSearch,
+ boolean caseSensitive) {
Set<String> terms =
Arrays.stream(listOfText)
@@ -77,7 +86,8 @@ class TextRedactionService {
}
List<Pattern> patterns =
- TextFinderUtils.createOptimizedSearchPatterns(terms, useRegex, wholeWordSearch);
+ TextFinderUtils.createOptimizedSearchPatterns(
+ terms, useRegex, wholeWordSearch, caseSensitive);
if (patterns.isEmpty()) {
return new HashMap<>();
diff --git a/app/core/src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java b/app/core/src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java
index 791b7626c4..a81e253733 100644
--- a/app/core/src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java
+++ b/app/core/src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java
@@ -29,6 +29,12 @@ public class RedactPdfRequest extends PDFFile {
requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean wholeWordSearch;
+ @Schema(
+ description = "Whether matching is case-sensitive, for plain text and regex alike",
+ defaultValue = "false",
+ requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Boolean caseSensitive;
+
@Schema(
description = "The color for redaction",
defaultValue = "#000000",
diff --git a/app/core/src/main/java/stirling/software/SPDF/utils/text/TextFinderUtils.java b/app/core/src/main/java/stirling/software/SPDF/utils/text/TextFinderUtils.java
index 3126f90ac6..404bf565f2 100644
--- a/app/core/src/main/java/stirling/software/SPDF/utils/text/TextFinderUtils.java
+++ b/app/core/src/main/java/stirling/software/SPDF/utils/text/TextFinderUtils.java
@@ -57,6 +57,14 @@ public class TextFinderUtils {
public static List<Pattern> createOptimizedSearchPatterns(
Set<String> searchTerms, boolean useRegex, boolean wholeWordSearch) {
+ return createOptimizedSearchPatterns(searchTerms, useRegex, wholeWordSearch, false);
+ }
+
+ public static List<Pattern> createOptimizedSearchPatterns(
+ Set<String> searchTerms,
+ boolean useRegex,
+ boolean wholeWordSearch,
+ boolean caseSensitive) {
List<Pattern> patterns = new ArrayList<>();
for (String term : searchTerms) {
@@ -73,7 +81,8 @@ public class TextFinderUtils {
// Use PatternFactory for better performance with cached compilation
Pattern pattern =
- RegexPatternUtils.getInstance().createSearchPattern(patternString, true);
+ RegexPatternUtils.getInstance()
+ .createSearchPattern(patternString, !caseSensitive);
patterns.add(pattern);
log.debug("Created search pattern: '{}' -> '{}'", term.trim(), patternString);
diff --git a/app/core/src/test/java/stirling/software/SPDF/controller/api/security/RedactControllerMoreTest.java b/app/core/src/test/java/stirling/software/SPDF/controller/api/security/RedactControllerMoreTest.java
index aa352fdf2f..e07b5310ae 100644
--- a/app/core/src/test/java/stirling/software/SPDF/controller/api/security/RedactControllerMoreTest.java
+++ b/app/core/src/test/java/stirling/software/SPDF/controller/api/security/RedactControllerMoreTest.java
@@ -35,6 +35,7 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
+import org.mockito.ArgumentCaptor;
import org.mockito.MockedStatic;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;
@@ -323,6 +324,74 @@ class RedactControllerMoreTest {
assertThat(text).doesNotContain("444-55-6666");
}
+ @Test
+ @DisplayName("matching ignores case unless caseSensitive is set")
+ void ignoresCaseByDefault() throws IOException {
+ byte[] bytes = singlePageTextPdf("ticket FS-01 and fs-02 here");
+ factoryReturns(bytes);
+
+ RedactPdfRequest request = new RedactPdfRequest();
+ request.setFileInput(pdfFile(bytes));
+ request.setListOfText("[A-Z]{2}-\\d+");
+ request.setUseRegex(true);
+ request.setRedactColor("#000000");
+
+ String text = pdfText(drainBody(controller.redactPdf(request)));
+ assertThat(text).doesNotContain("FS-01");
+ assertThat(text).doesNotContain("fs-02");
+ }
+
+ @Test
+ @DisplayName("caseSensitive leaves text in another case in place")
+ void caseSensitive() throws IOException {
+ byte[] bytes = singlePageTextPdf("ticket FS-01 and fs-02 here");
+ factoryReturns(bytes);
+
+ RedactPdfRequest request = new RedactPdfRequest();
+ request.setFileInput(pdfFile(bytes));
+ request.setListOfText("[A-Z]{2}-\\d+");
+ request.setUseRegex(true);
+ request.setCaseSensitive(true);
+ request.setRedactColor("#000000");
+
+ String text = pdfText(drainBody(controller.redactPdf(request)));
+ assertThat(text).doesNotContain("FS-01");
+ assertThat(text).contains("fs-02");
+ }
+
+ @Test
+ @DisplayName("JPDFium receives caseSensitive=false by default")
+ void jpdfiumIgnoresCaseByDefault() throws IOException {
+ assertThat(jpdfiumOptionsFor(null).caseSensitive()).isFalse();
+ }
+
+ @Test
+ @DisplayName("JPDFium receives caseSensitive=true when it is set")
+ void jpdfiumReceivesCaseSensitive() throws IOException {
+ assertThat(jpdfiumOptionsFor(true).caseSensitive()).isTrue();
+ }
+
+ /** The options the controller hands JPDFium; the call then fails so the fallback runs. */
+ private RedactOptions jpdfiumOptionsFor(Boolean caseSensitive) throws IOException {
+ byte[] bytes = singlePageTextPdf("ticket FS-01 and fs-02 here");
+ factoryReturns(bytes);
+
+ RedactPdfRequest request = new RedactPdfRequest();
+ request.setFileInput(pdfFile(bytes));
+ request.setListOfText("[A-Z]{2}-\\d+");
+ request.setUseRegex(true);
+ request.setCaseSensitive(caseSensitive);
+ request.setRedactColor("#000000");
+
+ ArgumentCaptor<RedactOptions> options = ArgumentCaptor.forClass(RedactOptions.class);
+ try (MockedStatic<PdfRedactor> redactor = mockStatic(PdfRedactor.class)) {
+ redactor.when(() -> PdfRedactor.redact(any(Path.class), options.capture()))
+ .thenThrow(new IllegalStateException("native redaction unavailable"));
+ drainBody(controller.redactPdf(request));
+ }
+ return options.getValue();
+ }
+
@Test
@DisplayName("convert-to-image still returns a valid 200 PDF response")
void convertToImage() throws IOException {
diff --git a/app/core/src/test/java/stirling/software/SPDF/controller/api/security/TextRedactionServiceExtraTest.java b/app/core/src/test/java/stirling/software/SPDF/controller/api/security/TextRedactionServiceExtraTest.java
index 0609d09cdb..79c14b7e1d 100644
--- a/app/core/src/test/java/stirling/software/SPDF/controller/api/security/TextRedactionServiceExtraTest.java
+++ b/app/core/src/test/java/stirling/software/SPDF/controller/api/security/TextRedactionServiceExtraTest.java
@@ -74,6 +74,18 @@ class TextRedactionServiceExtraTest {
}
}
+ @Test
+ @DisplayName("case-sensitive search leaves text in another case alone")
+ void caseSensitiveRegex() throws IOException {
+ try (PDDocument doc = buildDoc("ticket FS-01 and fs-02")) {
+ Map<Integer, List<PDFText>> result =
+ service.findTextToRedact(
+ doc, new String[] {"[A-Z]{2}-\\d+"}, true, false, true);
+ assertThat(result.get(0)).hasSize(1);
+ assertThat(result.get(0).get(0).getText()).isEqualTo("FS-01");
+ }
+ }
+
@Test
@DisplayName("two distinct literal terms both produce hits on the page")
void twoDistinctTerms() throws IOException {
diff --git a/app/core/src/test/java/stirling/software/SPDF/utils/text/TextFinderUtilsTest.java b/app/core/src/test/java/stirling/software/SPDF/utils/text/TextFinderUtilsTest.java
index 3bd90503e0..ea78e8ded5 100644
--- a/app/core/src/test/java/stirling/software/SPDF/utils/text/TextFinderUtilsTest.java
+++ b/app/core/src/test/java/stirling/software/SPDF/utils/text/TextFinderUtilsTest.java
@@ -87,6 +87,35 @@ class TextFinderUtilsTest {
assertTrue(patterns.get(0).matcher("helo").find());
}
+ @Test
+ void createOptimizedSearchPatterns_ignoresCaseByDefault() {
+ Pattern regex =
+ TextFinderUtils.createOptimizedSearchPatterns(Set.of("[A-Z]{2}-\\d+"), true, false)
+ .get(0);
+ Pattern literal =
+ TextFinderUtils.createOptimizedSearchPatterns(Set.of("secret"), false, false)
+ .get(0);
+
+ assertTrue(regex.matcher("fs-01").find());
+ assertTrue(literal.matcher("SECRET").find());
+ }
+
+ @Test
+ void createOptimizedSearchPatterns_caseSensitive_matchesCaseExactly() {
+ Pattern regex =
+ TextFinderUtils.createOptimizedSearchPatterns(
+ Set.of("[A-Z]{2}-\\d+"), true, false, true)
+ .get(0);
+ Pattern literal =
+ TextFinderUtils.createOptimizedSearchPatterns(Set.of("Secret"), false, false, true)
+ .get(0);
+
+ assertTrue(regex.matcher("FS-01").find());
+ assertFalse(regex.matcher("fs-01").find());
+ assertTrue(literal.matcher("Secret").find());
+ assertFalse(literal.matcher("SECRET").find());
+ }
+
@Test
void createOptimizedSearchPatterns_withWholeWord_addsWordBoundaries() {
Set<String> terms = Set.of("cat");
diff --git a/engine/src/stirling/models/tool_models.py b/engine/src/stirling/models/tool_models.py
index ebf64ed978..ecfec2dfe0 100644
--- a/engine/src/stirling/models/tool_models.py
+++ b/engine/src/stirling/models/tool_models.py
@@ -267,6 +267,9 @@ class AutoRedactParams(ApiModel):
This endpoint automatically redacts text from a PDF file based on specified patterns. Users can provide text patterns to redact, with options for regex and whole word matching. Input:PDF Output:PDF Type:SISO
"""
+ case_sensitive: bool = Field(
+ False, description="Whether matching is case-sensitive, for plain text and regex alike"
+ )
convert_pdf_to_image: bool = Field(False, description="Convert the redacted PDF to an image")
custom_padding: float = Field(..., description="Custom padding for redaction")
list_of_text: str = Field("text,text2", description="List of text to redact from the PDF")
diff --git a/frontend/editor/public/locales/en-US/translation.toml b/frontend/editor/public/locales/en-US/translation.toml
index 134fd22f23..ea7e56621e 100644
--- a/frontend/editor/public/locales/en-US/translation.toml
+++ b/frontend/editor/public/locales/en-US/translation.toml
@@ -11154,6 +11154,7 @@ tags = "Redact,Hide,black out,black,marker,hidden,auto redact,manual redact"
title = "Redact"
[redact.auto]
+caseSensitiveLabel = "Case Sensitive Matching"
colorLabel = "Box Color"
convertPDFToImageLabel = "Convert PDF to PDF-Image"
customPaddingLabel = "Custom Extra Padding"
@@ -11189,6 +11190,10 @@ manual = "Manual"
mode = "Mode"
title = "Redaction Method"
+[redact.tooltip.advanced.caseSensitive]
+text = "Only match text in the same case. 'Secret' won't match 'SECRET' when enabled, and [A-Z] in a regex only matches capitals."
+title = "Case Sensitive Matching"
+
[redact.tooltip.advanced.color]
text = "Customize the appearance of redaction boxes. Black is standard, but you can choose any color. Padding adds extra space around the found text."
title = "Box Color & Padding"
diff --git a/frontend/editor/src/core/components/tools/redact/RedactAdvancedSettings.test.tsx b/frontend/editor/src/core/components/tools/redact/RedactAdvancedSettings.test.tsx
index 0cbe0bc27d..54e9f189e7 100644
--- a/frontend/editor/src/core/components/tools/redact/RedactAdvancedSettings.test.tsx
+++ b/frontend/editor/src/core/components/tools/redact/RedactAdvancedSettings.test.tsx
@@ -153,6 +153,12 @@ describe("RedactAdvancedSettings", () => {
initialValue: false,
expectedValue: true,
},
+ {
+ paramName: "caseSensitive" as const,
+ label: "Case Sensitive Matching",
+ initialValue: false,
+ expectedValue: true,
+ },
{
paramName: "convertPDFToImage" as const,
label: "Convert PDF to PDF-Image (Used to remove text behind the box)",
diff --git a/frontend/editor/src/core/components/tools/redact/RedactAdvancedSettings.tsx b/frontend/editor/src/core/components/tools/redact/RedactAdvancedSettings.tsx
index fa685b22ab..f3fbfb6d9e 100644
--- a/frontend/editor/src/core/components/tools/redact/RedactAdvancedSettings.tsx
+++ b/frontend/editor/src/core/components/tools/redact/RedactAdvancedSettings.tsx
@@ -70,6 +70,16 @@ const RedactAdvancedSettings = ({
size="sm"
/>
+ <Checkbox
+ label={t("redact.auto.caseSensitiveLabel", "Case Sensitive Matching")}
+ checked={parameters.caseSensitive}
+ onChange={(e) =>
+ onParameterChange("caseSensitive", e.currentTarget.checked)
+ }
+ disabled={disabled}
+ size="sm"
+ />
+
{/* Convert PDF to PDF-Image */}
<Checkbox
label={t(
diff --git a/frontend/editor/src/core/components/tooltips/useRedactTips.ts b/frontend/editor/src/core/components/tooltips/useRedactTips.ts
index 80f14f3cde..bb0fc0c2f9 100644
--- a/frontend/editor/src/core/components/tooltips/useRedactTips.ts
+++ b/frontend/editor/src/core/components/tooltips/useRedactTips.ts
@@ -106,6 +106,16 @@ export const useRedactAdvancedTips = (): TooltipContent => {
"Only match complete words, not partial matches. 'John' won't match 'Johnson' when enabled.",
),
},
+ {
+ title: t(
+ "redact.tooltip.advanced.caseSensitive.title",
+ "Case Sensitive Matching",
+ ),
+ description: t(
+ "redact.tooltip.advanced.caseSensitive.text",
+ "Only match text in the same case. 'Secret' won't match 'SECRET' when enabled, and [A-Z] in a regex only matches capitals.",
+ ),
+ },
{
title: t(
"redact.tooltip.advanced.convert.title",
diff --git a/frontend/editor/src/core/hooks/tools/redact/useRedactOperation.test.ts b/frontend/editor/src/core/hooks/tools/redact/useRedactOperation.test.ts
index 77dc8c549d..265b157bcd 100644
--- a/frontend/editor/src/core/hooks/tools/redact/useRedactOperation.test.ts
+++ b/frontend/editor/src/core/hooks/tools/redact/useRedactOperation.test.ts
@@ -43,6 +43,7 @@ describe("buildRedactFormData", () => {
wordsToRedact: ["Confidential", "Secret"],
useRegex: true,
wholeWordSearch: true,
+ caseSensitive: true,
redactColor: "#FF0000",
customPadding: 0.5,
convertPDFToImage: false,
@@ -54,6 +55,7 @@ describe("buildRedactFormData", () => {
expect(formData.get("listOfText")).toBe("Confidential\nSecret");
expect(formData.get("useRegex")).toBe("true");
expect(formData.get("wholeWordSearch")).toBe("true");
+ expect(formData.get("caseSensitive")).toBe("true");
expect(formData.get("redactColor")).toBe("FF0000"); // Hash should be removed
expect(formData.get("customPadding")).toBe("0.5");
expect(formData.get("convertPDFToImage")).toBe("false");
@@ -119,6 +121,7 @@ describe("buildRedactFormData", () => {
expect(formData.get("useRegex")).toBe("false");
expect(formData.get("wholeWordSearch")).toBe("true");
+ expect(formData.get("caseSensitive")).toBe("false");
expect(formData.get("convertPDFToImage")).toBe("false");
});
diff --git a/frontend/editor/src/core/hooks/tools/redact/useRedactOperation.ts b/frontend/editor/src/core/hooks/tools/redact/useRedactOperation.ts
index fbfa5045e4..ac8925e2a6 100644
--- a/frontend/editor/src/core/hooks/tools/redact/useRedactOperation.ts
+++ b/frontend/editor/src/core/hooks/tools/redact/useRedactOperation.ts
@@ -28,6 +28,7 @@ export const redactToApiParams = (
listOfText: parameters.wordsToRedact.join("\n"),
useRegex: parameters.useRegex,
wholeWordSearch: parameters.wholeWordSearch,
+ caseSensitive: parameters.caseSensitive,
// The backend expects the hex colour without the leading '#'.
redactColor: parameters.redactColor.replace("#", ""),
customPadding: parameters.customPadding,
@@ -43,6 +44,7 @@ export const redactFromApiParams = (
useRegex: apiParams.useRegex ?? defaultParameters.useRegex,
wholeWordSearch:
apiParams.wholeWordSearch ?? defaultParameters.wholeWordSearch,
+ caseSensitive: apiParams.caseSensitive ?? defaultParameters.caseSensitive,
redactColor: apiParams.redactColor
? `#${apiParams.redactColor}`
: defaultParameters.redactColor,
diff --git a/frontend/editor/src/core/hooks/tools/redact/useRedactParameters.test.ts b/frontend/editor/src/core/hooks/tools/redact/useRedactParameters.test.ts
index e64c349a4a..23f3c369cc 100644
--- a/frontend/editor/src/core/hooks/tools/redact/useRedactParameters.test.ts
+++ b/frontend/editor/src/core/hooks/tools/redact/useRedactParameters.test.ts
@@ -17,6 +17,7 @@ describe("useRedactParameters", () => {
{ paramName: "wordsToRedact" as const, value: ["word1", "word2"] },
{ paramName: "useRegex" as const, value: true },
{ paramName: "wholeWordSearch" as const, value: true },
+ { paramName: "caseSensitive" as const, value: true },
{ paramName: "redactColor" as const, value: "#FF0000" },
{ paramName: "customPadding" as const, value: 0.5 },
{ paramName: "convertPDFToImage" as const, value: true },
@@ -138,6 +139,7 @@ describe("useRedactParameters", () => {
expect(result.current.parameters.mode).toBe("automatic");
expect(result.current.parameters.useRegex).toBe(false);
expect(result.current.parameters.wholeWordSearch).toBe(false);
+ expect(result.current.parameters.caseSensitive).toBe(false);
expect(result.current.parameters.convertPDFToImage).toBe(false);
});
diff --git a/frontend/editor/src/core/hooks/tools/redact/useRedactParameters.ts b/frontend/editor/src/core/hooks/tools/redact/useRedactParameters.ts
index a903908658..81e89cc3d1 100644
--- a/frontend/editor/src/core/hooks/tools/redact/useRedactParameters.ts
+++ b/frontend/editor/src/core/hooks/tools/redact/useRedactParameters.ts
@@ -13,6 +13,7 @@ export interface RedactParameters extends BaseParameters {
wordsToRedact: string[];
useRegex: boolean;
wholeWordSearch: boolean;
+ caseSensitive: boolean;
redactColor: string;
customPadding: number;
convertPDFToImage: boolean;
@@ -23,6 +24,7 @@ export const defaultParameters: RedactParameters = {
wordsToRedact: [],
useRegex: false,
wholeWordSearch: false,
+ caseSensitive: false,
redactColor: "#000000",
customPadding: 0.1,
convertPDFToImage: false,
diff --git a/frontend/editor/src/core/hooks/tools/shared/migratedToolMappers.test.ts b/frontend/editor/src/core/hooks/tools/shared/migratedToolMappers.test.ts
index d562384921..fddaa4e830 100644
--- a/frontend/editor/src/core/hooks/tools/shared/migratedToolMappers.test.ts
+++ b/frontend/editor/src/core/hooks/tools/shared/migratedToolMappers.test.ts
@@ -138,6 +138,7 @@ describe("redact mappers", () => {
wordsToRedact: ["foo", "bar"],
useRegex: true,
wholeWordSearch: false,
+ caseSensitive: false,
redactColor: "#ff0000",
customPadding: 0.2,
convertPDFToImage: false,
@@ -147,6 +148,7 @@ describe("redact mappers", () => {
listOfText: "foo\nbar",
useRegex: true,
wholeWordSearch: false,
+ caseSensitive: false,
redactColor: "ff0000", // '#' stripped for the backend
customPadding: 0.2,
convertPDFToImage: false,
@@ -159,6 +161,7 @@ describe("redact mappers", () => {
wordsToRedact: ["secret"],
useRegex: false,
wholeWordSearch: true,
+ caseSensitive: true,
redactColor: "#123456",
customPadding: 0.1,
convertPDFToImage: true,
@@ -168,6 +171,7 @@ describe("redact mappers", () => {
wordsToRedact: [],
useRegex: false,
wholeWordSearch: false,
+ caseSensitive: false,
redactColor: "#000000",
customPadding: 0,
convertPDFToImage: false,
diff --git a/frontend/editor/src/core/types/toolApiTypes.ts b/frontend/editor/src/core/types/toolApiTypes.ts
index 95ea5d6073..ac2fda45af 100644
--- a/frontend/editor/src/core/types/toolApiTypes.ts
+++ b/frontend/editor/src/core/types/toolApiTypes.ts
@@ -1222,6 +1222,10 @@ export interface RedactStyle {
strategy?: "AUTO" | "OVERLAY_ONLY" | "IMAGE_FINALIZE";
}
export interface RedactPdfRequest {
+ /**
+ * Whether matching is case-sensitive, for plain text and regex alike
+ */
+ caseSensitive?: boolean;
/**
* Convert the redacted PDF to an image
*/
diff --git a/frontend/editor/src/proprietary/components/policies/PolicyPiiField.stories.tsx b/frontend/editor/src/proprietary/components/policies/PolicyPiiField.stories.tsx
index 12c764dd4f..1e0b4dd50c 100644
--- a/frontend/editor/src/proprietary/components/policies/PolicyPiiField.stories.tsx
+++ b/frontend/editor/src/proprietary/components/policies/PolicyPiiField.stories.tsx
@@ -9,6 +9,7 @@ const BASE_PARAMETERS: RedactParameters = {
wordsToRedact: [],
useRegex: false,
wholeWordSearch: false,
+ caseSensitive: false,
redactColor: "#000000",
customPadding: 0.1,
convertPDFToImage: true,
diff --git a/frontend/editor/src/proprietary/components/policies/PolicyRedactConfig.stories.tsx b/frontend/editor/src/proprietary/components/policies/PolicyRedactConfig.stories.tsx
index 2befe6971b..cf5956618a 100644
--- a/frontend/editor/src/proprietary/components/policies/PolicyRedactConfig.stories.tsx
+++ b/frontend/editor/src/proprietary/components/policies/PolicyRedactConfig.stories.tsx
@@ -9,6 +9,7 @@ const BASE_PARAMETERS: RedactParameters = {
wordsToRedact: [],
useRegex: true,
wholeWordSearch: false,
+ caseSensitive: false,
redactColor: "#000000",
customPadding: 0.1,
convertPDFToImage: true,