Jump to content

Check Price/Amount input for "," symbol


Recommended Posts

When using "," (comma) as a separator in any field where the price or amount of money needs to be specified a number of effects can be observed which severely mess up data integrity of the item in question and other items effected by it.

 

As of now the input data is sent directly to MySQL and the following will occur.

1. Decimal places will be dropped (i.e. entering 10,50 will result in 10.00) anywhere.

2. Transactions that have "Add to Client's Credit Balance" enabled will result in Client's Credit Balance reset to "0", without any log entries anywhere.

3. Invoice overpayments will not effects Client's Credit Balance with no log entries anywhere as well.

 

These effects occur without displaying any errors and with no log entries in System Activity Log, thus making it extremely difficult to track and correct if somehow found out.

 

In my opinion this behavior creates severe data integrity risks for the system.

Link to comment
Share on other sites

Hello,

 

As a general policy we do not perform input validation in the admin area. We want to leave as much freedom as possible for Admin users and expect they know what valid and invalid input is. In this case the repercussions give me pause, so I have opened CORE-8564 to track our discussion internally about the issue.

 

Thanks for the report,

 

Nate C

Link to comment
Share on other sites

Hello,

 

After further investigation I have not been able to reproduce what you list as #2 or #3 in the WHCMS 6.0-rc.2. We expect to ignore anything after the ",". If you can provide detailed reproduction steps for how the input validation is cascading we are open to reconsidering this, but at this point the case was closed as "can't reproduce".

 

Have a great day,

 

Nate C

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated