mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-23 12:03:09 +02:00
fix(stream): guard the ISP-update block when no ISP was detected
getStreamingUserInfo() sets isp_asn / con_isp_name only when GeoIPService::getISP() actually returns an ISP. The follow-up block that persists a changed ISP still ran when none was detected (con_isp_name stays null): it read the undefined isp_asn key — the "Undefined array key isp_asn" warning from UserRepository.php:348 — and wrote a null isp_desc/as_number to the line. Gate it on a non-empty con_isp_name, matching the isp_violate check above.
This commit is contained in:
@@ -342,7 +342,7 @@ class UserRepository {
|
||||
$rUserInfo['isp_violate'] = 1;
|
||||
}
|
||||
|
||||
if ($rUserInfo['isp_violate'] == 0 && strtolower($rUserInfo['con_isp_name']) != strtolower($rUserInfo['isp_desc'])) {
|
||||
if (!empty($rUserInfo['con_isp_name']) && $rUserInfo['isp_violate'] == 0 && strtolower($rUserInfo['con_isp_name']) != strtolower($rUserInfo['isp_desc'])) {
|
||||
if ($rCached) {
|
||||
$rSignalKey = 'isp/' . $rUserInfo['id'];
|
||||
file_put_contents(SIGNALS_TMP_PATH . 'cache_' . md5($rSignalKey), json_encode(array($rSignalKey, json_encode(array($rUserInfo['con_isp_name'], $rUserInfo['isp_asn'])))));
|
||||
|
||||
Reference in New Issue
Block a user