Skip to content

Commit cc31452

Browse files
committed
format
1 parent 1fcd9f8 commit cc31452

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/json_path.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {JSONPath} from 'jsonpath-plus';
1+
import { JSONPath } from 'jsonpath-plus';
22

33
export function jsonpath(path: string, json: object): any {
44
return JSONPath({

src/json_path_test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import { jsonpath } from './json_path';
44
describe('jsonpath', () => {
55
it('should throw if vulnerable for RCE (remote code execution)', () => {
66
expect(() => {
7-
jsonpath('$..[?(' + '(function a(arr){' + 'a([...arr, ...arr])' + '})([1]);)]', { nonEmpty: 'object' });
7+
jsonpath('$..[?(' + '(function a(arr){' + 'a([...arr, ...arr])' + '})([1]);)]', {
8+
nonEmpty: 'object',
9+
});
810
}).to.throw();
911
});
1012
});

0 commit comments

Comments
 (0)