Skip to content

Commit

Permalink
deal with csrf token
Browse files Browse the repository at this point in the history
  • Loading branch information
nondanee committed May 15, 2018
1 parent d3ef520 commit 0d2b2fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions util/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ function createWebAPIRequest(
errorcallback
) {
// console.log(cookie);
if (cookie.match(/_csrf=[^(;|$)]+;/g))
data.csrf_token = cookie.match(/_csrf=[^(;|$)]+/g)[0].slice(6);
else data.csrf_token = "";
const proxy = cookie.split("__proxy__")[1];
cookie = cookie.split("__proxy__")[0];
const cryptoreq = Encrypt(data);
Expand Down

0 comments on commit 0d2b2fb

Please sign in to comment.