ceceradio / twitter-block-chain

Chrome extension to block all users on a followers/following page.
MIT License
247 stars 50 forks source link

[Chrome] Blocking doesn't work -- some tests and ideas #21

Closed stypr closed 5 years ago

stypr commented 5 years ago

I get the same problem with #5 now.

So as for now, I decided to do some basic tests on this and try to figure out the issue. So I was checking this original blockchain.js#L186 and I found out that the parameter changed so I decided to change the data and try it:

        data: {
            authenticity_token: authenticity_token,
            challenges_passed: false,
            handles_challenges: "1",
            impression_id: "",
            user_id: String(user_id),
            //block_user: true,
            //report_type: "",
            //screen_name: user_name,
    },

it still didn't work out well šŸ˜ž

I've also added an header to ajax request, it still didn't work out well.

headers: { "x-twitter-active-user": "yes", }

For now, the only header left between the original request and the app's request is the Origin header. picture

It is certain that the Twitter might check the Origin header for the security issue. But usually changing Origin header is not allowed from script by default.

So if there's any way find a way to change the Origin, we can get this problem fixed somehow.

I think there are websites that says chrome.webRequest.onBeforeSendHeaders.addListener can be used to modify the Origin header but I couldn't make it work.. can you find a way about it?

ceceradio commented 5 years ago

duplicate of #24