Validate URL on Redirection to avoid breaking app

Validate URL on Redirection to avoid breaking app
This commit is contained in:
Johannes
2023-08-30 15:58:58 +02:00
committed by GitHub

View File

@@ -121,6 +121,14 @@ export default function SurveyMenuBar({
return false;
}
if (
survey.redirectUrl &&
!survey.redirectUrl.includes("https://") &&
!survey.redirectUrl.includes("http://")
) {
toast.error("Please enter a valid URL for redirecting respondents");
return false;
}
return true;
};