Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Commit eefbf3d

Browse files
committed
fix: remove check for untrusted schema
1 parent cf8d5b3 commit eefbf3d

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

src/wrap.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { isSchemaValidationError, wrapDocument, utils, getData } from "@govtechs
55
import path from "path";
66
import fetch from "node-fetch";
77
import Ajv from "ajv";
8-
import secureSchema from "ajv/lib/refs/json-schema-secure.json";
98

109
class SchemaValidationError extends Error {
1110
constructor(message: string, public validationErrors: Ajv.ErrorObject[], public document: any) {
@@ -143,10 +142,6 @@ export const merkleHashmap = (leafHashes: Buffer[]): Record<string, { sibling: s
143142

144143
const loadSchema = (schemaPath?: string): Promise<Schema | undefined> => {
145144
const checkSchema = (schema: any): Schema => {
146-
const isSchemaSecure = new Ajv().compile(secureSchema);
147-
if (!isSchemaSecure(schema)) {
148-
throw new Error("Untrustable schema, please check https://github.com/epoberezkin/ajv#untrusted-schemas");
149-
}
150145
if (!schema.$id) {
151146
throw new Error("Invalid schema, you must provide an $id property to your schema");
152147
}

0 commit comments

Comments
 (0)