Moti Mashiah
asked on
asp.net & javascript
Hi Guys,
I have a aspx page which contain element that call javascript function:
Here is the example:
I would like to know if you have any idea to secure this function?
N.B - this function been called by many button in the app so please try giving me solution for the javascript function itself.
Thank you in advance.
I have a aspx page which contain element that call javascript function:
Here is the example:
<asp:Button ID="btnClose" runat="server" CssClass="btn btn-default" Text="Close" OnClientClick="javascript:delCookie('hdnMenuIds');delCookie('hdnMenuIdsOld');" visible="false"/>
//javascript function
function delCookie(name) {
document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
};
The problem I have with this concept is xss/ cross site vulnerability.I would like to know if you have any idea to secure this function?
N.B - this function been called by many button in the app so please try giving me solution for the javascript function itself.
Thank you in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER