avlidienbrunn / anti-csrf-plugin Goto Github PK
View Code? Open in Web Editor NEWChrome extension for blocking x-origin cookies
Chrome extension for blocking x-origin cookies
It'll think that the "main domain" is "co.uk" and thus allow anything to be CSRF'd there. Thanks @fransrosen for pointing this out.
Currently you can still do GET CSRF if you redirect the main window (navigate) to the URL. GET CSRF via images/other is still blocked though.
This loops over details.responseHeaders and changes it in the loop. Will it break?
for (var i = 0; i < details.responseHeaders.length; ++i) {
if (details.responseHeaders[i].name === 'Set-Cookie') {
details.responseHeaders.splice(i, 1);
//No break here since multiple set-cookie headers are allowed in one response.
}
}
By visiting Site1 and then manually typing Site2 in the URL bar, the plugin will strip cookies although it shouldn't since the request was manually initiated. Same with back/forward button and bookmark field.
The code currently keeps track of the current URL by holding an array of tab object(s). This is because I didn't find any synchronous way to get the current URL of the tab issuing the request, but if that's possible somehow it will be a significant performance boost. And nicer code to look at.
Currently I just reload the tab (this makes blocked POST requests valid), but there are many scenarios where this won't solve the issue.
Some sites will set a new session and destroy the old one in the process when a request is made using a faulty and/or missing session cookie. This leads to the user being logged out from the stripped site.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.