You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-29 08:21:11 +03:00
Add compress-level range checking for each compress-type.
The prior range checking was done based on the valid values for gz. While this worked it was a subset of what is available for lz4 and zst. Allow the range to be specified for each compress-type. Adding this functionality to the parse module would be a better solution but that is a bigger project than this fix deserves, at least for now.
This commit is contained in:
@ -426,9 +426,8 @@ foreach my $strKey (sort(keys(%{$rhConfigDefine})))
|
||||
$rhConfigDefine->{$strKey}{&CFGDEF_SECURE} = false;
|
||||
}
|
||||
|
||||
# All int, size and time options must have an allow range
|
||||
if (($rhConfigDefine->{$strKey}{&CFGDEF_TYPE} eq CFGDEF_TYPE_INTEGER ||
|
||||
$rhConfigDefine->{$strKey}{&CFGDEF_TYPE} eq CFGDEF_TYPE_TIME ||
|
||||
# All size and time options must have an allow range
|
||||
if (($rhConfigDefine->{$strKey}{&CFGDEF_TYPE} eq CFGDEF_TYPE_TIME ||
|
||||
$rhConfigDefine->{$strKey}{&CFGDEF_TYPE} eq CFGDEF_TYPE_SIZE) &&
|
||||
!(defined($rhConfigDefine->{$strKey}{&CFGDEF_ALLOW_RANGE}) || defined($rhConfigDefine->{$strKey}{&CFGDEF_ALLOW_LIST})))
|
||||
{
|
||||
|
Reference in New Issue
Block a user