Skip to content

Commit

Permalink
chore(vulnerability): Inefficient Regular Expression - Potential high…
Browse files Browse the repository at this point in the history
… time complexity leading to ReDoS (#10315)
  • Loading branch information
Sukeerthi31 authored and yoonhyejin committed Jul 16, 2024
1 parent 3c453bc commit ce534e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datahub-web-react/src/app/ingest/source/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const getExecutionRequestStatusDisplayColor = (status: string) => {
export const validateURL = (fieldName: string) => {
return {
validator(_, value) {
const URLPattern = new RegExp(/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/);
const URLPattern = new RegExp(/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[a-zA-Z0-9.-]{2,})+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/);
const isURLValid = URLPattern.test(value);
if (!value || isURLValid) {
return Promise.resolve();
Expand Down

0 comments on commit ce534e2

Please sign in to comment.