From f2df999455ee3604c2bbafdd32ae409fb6395164 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Thu, 10 Aug 2023 22:37:09 +0700 Subject: [PATCH] Minor improvements (#217) * Minor improvements * Update CHANGELOG.md --- CHANGELOG.md | 2 +- library/ajax/edit_user_profile.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14192e19..8b880432 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ **Merged pull requests:** - Release v2.1.5-2023.08 🎉 -- Minor improvements [\#215](https://github.com/torrentpier/torrentpier-lts/pull/215), [\#216](https://github.com/torrentpier/torrentpier-lts/pull/216) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#215](https://github.com/torrentpier/torrentpier-lts/pull/215), [\#216](https://github.com/torrentpier/torrentpier-lts/pull/216), [\#217](https://github.com/torrentpier/torrentpier-lts/pull/217) ([belomaxorka](https://github.com/belomaxorka)) ## [v2.1.5-2023.07](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.07) (2023-08-04) [Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.06...v2.1.5-2023.07) diff --git a/library/ajax/edit_user_profile.php b/library/ajax/edit_user_profile.php index 409d9078..22c89b0e 100644 --- a/library/ajax/edit_user_profile.php +++ b/library/ajax/edit_user_profile.php @@ -154,6 +154,10 @@ switch ($field) $value = htmlCHR($value); $value = (float) str_replace(',', '.', $this->request['value']); $value = sprintf('%.2f', $value); + if (strlen(strstr($value, '.', true)) > 14) + { + $this->ajax_die($lang['WRONG_INPUT']); + } $this->response['new_value'] = $value; break;