替换获取pt_pin的正则,解决部分cookie填写不规范获取用户名为null的情况
This commit is contained in:
@@ -52,7 +52,7 @@ function GetCookie() {
|
||||
var CV = $request.headers["Cookie"] || $request.headers["cookie"];
|
||||
if (CV.match(/(pt_key=.+?pt_pin=|pt_pin=.+?pt_key=)/)) {
|
||||
var CookieValue = CV.match(/pt_key=.+?;/) + CV.match(/pt_pin=.+?;/);
|
||||
var UserName = CookieValue.match(/pt_pin=(.+?);/)[1];
|
||||
var UserName = CookieValue.match(/pt_pin=([^; ]+)(?=;?)/)[1];
|
||||
var DecodeName = decodeURIComponent(UserName);
|
||||
var CookiesData = getCache();
|
||||
var updateCookiesData = [...CookiesData];
|
||||
@@ -62,7 +62,7 @@ function GetCookie() {
|
||||
var ck = item.cookie;
|
||||
var Account = ck
|
||||
? ck.match(/pt_pin=.+?;/)
|
||||
? ck.match(/pt_pin=(.+?);/)[1]
|
||||
? ck.match(/pt_pin=([^; ]+)(?=;?)/)[1]
|
||||
: null
|
||||
: null;
|
||||
const verify = UserName === Account;
|
||||
|
Reference in New Issue
Block a user