Skip to content

Commit

Permalink
Fix address bar spoofing server routes (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
not-a-rootkit authored Nov 20, 2024
1 parent d652d9b commit 7359c84
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion security/address-bar-spoofing/spoof-js-download-url.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
const w = open()
w.opener = null
w.document.write('<h1>Not DDG.</h1>')
w.location = '/security/address-bar-spoofing-download-redirect'
w.location = '/security/abs/download-redirect'
}
</script>
</head>
Expand Down
4 changes: 2 additions & 2 deletions security/address-bar-spoofing/spoof-new-window.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
try {
w.location.href;
} catch (e) {
w.location.href = 'https://broken.third-party.site/security/address-bar-spoofing/no-content';
w.location.href = 'https://broken.third-party.site/security/abs/no-content';
clearInterval(i);
}
}, 1);
Expand All @@ -37,7 +37,7 @@
vulnerable to this attack. Note: this won't work if run from broken.third-party.site. Ensure it is run from
another origin such as https://privacy-test-pages.site.


<button onclick="newWindow()">New Window</button>
<button onclick="spoof()">Spoof</button>
</body>
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ const viewportRoutes = require('./viewport/server/routes.js');
app.use('/viewport', viewportRoutes);

const addressBarSpoofingRoutes = require('./security/address-bar-spoofing/server/routes.js');
app.use('/security/address-bar-spoofing-download-redirect', addressBarSpoofingRoutes);
app.use('/security/abs/', addressBarSpoofingRoutes);

const phishingDetectionRoutes = require('./security/badware/server/routes.js');
app.use('/security/badware/phishing-redirect', phishingDetectionRoutes);
Expand Down

0 comments on commit 7359c84

Please sign in to comment.