mirror of
https://github.com/telemt/telemt.git
synced 2026-10-30 12:30:34 +03:00
Runtime Ownership hardened
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
This commit is contained in:
@@ -143,9 +143,15 @@ pub(super) fn validate(config: &mut ProxyConfig) -> Result<()> {
|
||||
));
|
||||
}
|
||||
|
||||
if config.general.me_reinit_trigger_channel == 0 {
|
||||
if !(1..=8).contains(&config.general.me_reinit_max_concurrency) {
|
||||
return Err(ProxyError::Config(
|
||||
"general.me_reinit_trigger_channel must be > 0".to_string(),
|
||||
"general.me_reinit_max_concurrency must be within [1, 8]".to_string(),
|
||||
));
|
||||
}
|
||||
|
||||
if !(1..=4096).contains(&config.general.me_reinit_trigger_channel) {
|
||||
return Err(ProxyError::Config(
|
||||
"general.me_reinit_trigger_channel must be within [1, 4096]".to_string(),
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user