Skip to content

Commit 986a3f2

Browse files
committed
fix Polynomial regular expression used on uncontrolled data
1 parent 1b03920 commit 986a3f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/ra-core/src/inference/assertions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const isUrl = (value: any): value is string =>
2929
export const valuesAreUrl = (values: any[]) => values.every(isUrl);
3030

3131
const ImageUrlRegexp =
32-
/http(s*):\/\/.*\.(jpeg|jpg|jfif|pjpeg|pjp|png|svg|gif|webp|apng|bmp|ico|cur|tif|tiff)/i;
32+
/^http(s*):\/\/.*\.(jpeg|jpg|jfif|pjpeg|pjp|png|svg|gif|webp|apng|bmp|ico|cur|tif|tiff)/i;
3333
export const isImageUrl = (value: any): value is string =>
3434
!value || ImageUrlRegexp.test(value);
3535
export const valuesAreImageUrl = (values: any[]) => values.every(isImageUrl);

0 commit comments

Comments
 (0)