mirror of
https://github.com/LX3JL/xlxd.git
synced 2025-12-06 07:42:01 +01:00
Catch missing protocols in the validation
This commit is contained in:
parent
1c241339bf
commit
e6de34a701
|
|
@ -20,7 +20,7 @@ class Node {
|
||||||
|
|
||||||
// Validate protocol
|
// Validate protocol
|
||||||
$Protocol = trim($Protocol);
|
$Protocol = trim($Protocol);
|
||||||
$allowed_protocols = ['DPlus', 'DExtra', 'DCS', 'DMR', 'YSF', 'DEXTRA', 'DPLUS'];
|
$allowed_protocols = ['DPlus', 'DExtra', 'DCS', 'DMR', 'YSF', 'DEXTRA', 'DPLUS', 'DMRMmdvm'];
|
||||||
$this->Protocol = in_array($Protocol, $allowed_protocols, true) ? $Protocol : 'Unknown';
|
$this->Protocol = in_array($Protocol, $allowed_protocols, true) ? $Protocol : 'Unknown';
|
||||||
|
|
||||||
$this->ConnectTime = ParseTime($ConnectTime);
|
$this->ConnectTime = ParseTime($ConnectTime);
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class Peer {
|
||||||
|
|
||||||
// Validate protocol
|
// Validate protocol
|
||||||
$Protocol = trim($Protocol);
|
$Protocol = trim($Protocol);
|
||||||
$allowed_protocols = ['DPlus', 'DExtra', 'DCS', 'DMR', 'YSF', 'DEXTRA', 'DPLUS'];
|
$allowed_protocols = ['DPlus', 'DExtra', 'DCS', 'DMR', 'YSF', 'DEXTRA', 'DPLUS', 'XLX'];
|
||||||
$this->Protocol = in_array($Protocol, $allowed_protocols, true) ? $Protocol : 'Unknown';
|
$this->Protocol = in_array($Protocol, $allowed_protocols, true) ? $Protocol : 'Unknown';
|
||||||
|
|
||||||
$this->ConnectTime = ParseTime($ConnectTime);
|
$this->ConnectTime = ParseTime($ConnectTime);
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ function validate_module($module) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function validate_protocol($protocol) {
|
function validate_protocol($protocol) {
|
||||||
$allowed = ['DPlus', 'DExtra', 'DCS', 'DMR', 'YSF', 'DEXTRA', 'DPLUS'];
|
$allowed = ['DPlus', 'DExtra', 'DCS', 'DMR', 'YSF', 'DEXTRA', 'DPLUS', 'DMRMmdvm', 'XLX'];
|
||||||
return in_array(trim($protocol), $allowed, true) ? trim($protocol) : '';
|
return in_array(trim($protocol), $allowed, true) ? trim($protocol) : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue