Loading...
 
Skip to main content

Accounting: Illogical decimal separators

Status
Closed
Subject
Accounting: Illogical decimal separators
Version
18.x
Category
  • Bug
  • Consistency
  • Easy for Newbie Dev
  • Less than 30-minutes fix
Feature
Accounting
Resolution status
Won't Fix
Submitted by
hman
Lastmod by
hman
Rating
(0)
Description

/lib/core/Tracker/Field/Computed.php says "This feature is still in place for backward compatibility. While it has no known flaws, it could be used as a vector for a malicious attack. A webservice field or custom JavaScript is recommended instead of this field.". Well, I know a flaw 😊

Look at lines 46 and 53:

Copy to clipboard
'dec_point' => [ 'name' => tr('Decimal separator when displaying data'), 'description' => tr('Single character. Use "c" for comma, "d" for dot or "s" for space. The valid decimal separator when inserting numbers may depend on the site language and web browser. See the documentation for more details.'), 'filter' => 'text', 'default' => '.', 'legacy_index' => 2, ], 'thousands' => [ 'name' => tr('Thousand separator when displaying data'), 'description' => tr('Single character: use "c" for comma, "d" for dot or "s" for space. When inserting data, no thousands separator is needed.'), 'filter' => 'text', 'default' => ',', 'legacy_index' => 3, ],


Well, use c for comma or d for dot or s for space. Well. But the defaults are "." and "," 😊 Whoever wrote the description did not write the defaults 😊

Solution
"still in place for backward compatibility" means the next step is deleting it.
Importance
6
Easy to solve?
10 easy
Priority
60
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
7485
Created
Sunday 09 August, 2020 17:29:12 UTC
by hman
LastModif
Monday 10 August, 2020 09:57:32 UTC


Show PHP error messages