Validate the data in a server action before changing the database.

I received this warnings a couple for times and I am unsure of how to create the server action to validate the data. Can anyone show it in an oml? Thanks. 

Hi Jolene,

You need to validate the data on the server before you perform a database operation that can modify data or change the permissions. From the security and data integrity point of view, such validation must be implemented on the server. A client-side validation is not enough, as its purpose is to provide fast feedback to the users.

For ex - if a filed require a specific value in specific format , better you validate that through a server side validation.

Go through the below link for better understanding.

https://success.outsystems.com/Documentation/11/Reference/Errors_and_Warnings/Warnings/Security_Warning


Regards,

-PJ-

Solution

Hi Jolene,


Is it possible that you got the first warning of this documentation?

https://success.outsystems.com/Documentation/11/Reference/Errors_and_Warnings/Warnings/Security_Warning

It has something to do with the fact that you directly put a server-update-create-or-delete action in your client action.

The way to do it is to wrap the Create-action in a server-action and then put that server-action in your client-action.



Kind regards,

Evert-Jan

Solution

Evert-Jan van den Broek wrote:

Hi Jolene,


Is it possible that you got the first warning of this documentation?

https://success.outsystems.com/Documentation/11/Reference/Errors_and_Warnings/Warnings/Security_Warning

It has something to do with the fact that you directly put a server-update-create-or-delete action in your client action.

The way to do it is to wrap the Create-action in a server-action and then put that server-action in your client-action.



Kind regards,

Evert-Jan

Hi,

Thank you very much! I solved my security warnings.