Proektsoftbg / Calcpad

Free and open source software for mathematical and engineering calculations.
https://calcpad.eu
MIT License
321 stars 39 forks source link

Input data validation #211

Closed Proektsoftbg closed 7 months ago

Proektsoftbg commented 7 months ago

Yesterday I was reported a severe bug in Calcpad:

If you enter an invalid value in an input form, it gives an error and damages the source code. You cannot recover from this, except unlocking and fixing the code. However, this is not possible for cpdz files.

image

If you save and overwrite the file, the damaged code is saved and the file gets corrupted. It is unbelievable how we missed this so far. You can try it on your current version.

Today, I added a preliminary data validation to check if all input fields contain valid numbers. If not, an appropriate error message is displayed and the user has the opportunity to correct the input.

image

Now, it is not possible to damage the file. Also, application crash handling, logging and recovery was improved. You can download the updated version from: https://github.com/Proektsoftbg/Calcpad/blob/main/Setup/calcpad-setup-en-x64.exe

I will publish the official release soon.

Proektsoftbg commented 7 months ago

The same is applied in the web version:

https://calcpad.eu/Worksheet/1/cubic-equation

image