Fixed negative integer seed bonus accrual (#1377)

* Fixed negative integer seed bonus accrual

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-02-04 13:59:21 +07:00 committed by GitHub
commit acbe838c23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -145,7 +145,7 @@ switch ($field) {
case 'user_points':
$value = (float)str_replace(',', '.', $this->request['value']);
$value = sprintf('%.2f', $value);
if (strlen(strstr($value, '.', true)) > 14) {
if ($value < 0.0 || strlen(strstr($value, '.', true)) > 14) {
$this->ajax_die($lang['WRONG_INPUT']);
}
$this->response['new_value'] = $value;