Skip to content

Commit

Permalink
Updated base64 in types.ts to use chunk processing
Browse files Browse the repository at this point in the history
  • Loading branch information
klh authored Dec 4, 2024
1 parent 010a365 commit ad0a7e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ export class ZodString extends ZodType<string, ZodStringDef, string> {
status.dirty();
}
} else if (check.kind === "base64") {
if (!base64Regex.test(input.data)) {
if(!processInChunks(input.data, 2048, 4, (chunk)=>base64Regex(chunk))) {
ctx = this._getOrReturnCtx(input, ctx);
addIssueToContext(ctx, {
validation: "base64",
Expand Down

0 comments on commit ad0a7e1

Please sign in to comment.