How to validate url string to avoid phishing attacks
Hi,I am using window.ShowModalDialog function in my application javascript file. I am passing url as string to this function and marked as phishing attack vulnerablility by scanner. Recommendation provided is validate url . How can validate url string in javascript to avoid phishing attacks. My code looks like below.
var Id=document.getElementById("ID");
var eName=document.getElementById("Name");
var sUrl="https://myhomepage.aspx?EmployeeId='+ id + '&Name='+ eName;
window.showModalDialog(sUrl,"arguments", sfeatures);