luk3yx.github.io/js/redirect.js
2018-12-08 10:51:13 +13:00

10 lines
267 B
JavaScript

// You think I would copyright this?
// Of course not.
url = getParam.url;
// https://stackoverflow.com/a/3480785/1 for the XSS detection.
if (url.indexOf("javascript:") >= 0) {
window.location.href = "/error.html#xss";
} else {
window.location.href = url;
}