允许关闭用户传参的签名验证

pull/34/head
david082321 2 years ago committed by GitHub
parent e8f54ee32d
commit 26915f8324
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,6 +17,7 @@ $WHITELIST = array('1', '2', '3'); // 本地白名单,填写 uid可自行
define('ROAMING_MIN_VER', 0); // 设置最低允许漫游版本,详情看哔哩漫游仓库 versionCode
define('ROAMING_MAX_VER', 0); // 0 表示不限制,设置最高允许漫游版本,详情看哔哩漫游仓库 versionCode
define('BLACKLIST_ERROR', 1); // 在线黑名单服务器发生错误的处理方式。2 全部拉黑并提示错误, 1 改用本地黑白名单, 0 不拉黑任何人也不提示
define('SIGN', true); // 用户传参的签名验证请勿关闭后果自负。false 关闭, true 开启
// 封锁指定epid视频
define('BAN_EP', 0); // 是否开启ban特定视频

@ -65,7 +65,7 @@ if (BILIROAMING_VERSION == '' && BILIROAMING_VERSION_CODE == '') {
block(15, "错误请求头");
}
$ts = @$_GET['ts'];
if ($ts == '') {
if ($ts == '' || !SIGN) {
define('TS', time());
} else {
if ($ts < time()-60 || $ts > time()+60) {
@ -84,7 +84,7 @@ if (in_array(AREA, $BAN_SERVER_AREA)) {
}
// 验证 signplayurl
if ($type == 1) {
if ($type == 1 && SIGN) {
$sign = @$_GET['sign'];
if (APPKEY != "" && $sign != "" && TS != "") {
check_sign(APPKEY, $sign, $query);

Loading…
Cancel
Save