Reputation:
I have a base page in asp.net. In this page if there is a problem authentication, it automatically redirects to login page with this code:
response.write("<script>window.open('" & LoginPage & "','_parent');</script>");
Does this have a security problem? I mean using javascript for redirecting to another page has a security problem or not?
Upvotes: 1
Views: 50
Reputation: 36
As a general rule, anything that hasn't been sanitized from user input poses a threat. if LoginPage variable comes from user input, then it can indeed be a security problem, if not handled correctly... otherwise no.
This question has some useful replies Good way to sanitize input in classic asp
In addition.. JavaScript is client-side, meaning it has no effect on your server, only the client.
Upvotes: 1