Server side HTML Validation

Is there any existing way of validating the html that comes from your RCE element? because currently there is nothing to stop someone editing the rce content to inject a script and then submitting that to the server. Is there any server side validation to make sure that only the elements that are used by the RCE are contained in the submitted value?


3 Replies

BS Buvana Sathasivam Syncfusion Team February 7, 2022 11:40 AM UTC

Hi Nicholas, 

Greetings from Syncfusion support. 

You can disable the cross-scripting site using the EnableHtmlSanitizer boolean property. This property is used to allow the cross-scripting site to exist or not. By default, this property is enabled on the Rich Text Editor component. To achieve your requirement, you can disable this property. 
  
API link:  

Regards, 
Buvana S 



NI Nicholas February 7, 2022 11:44 AM UTC

but say i have an RTE on a page and i'm expecting a string that is HTML to come from that input. Nothing would stop someone from just opening postman and submitting data to the same form while completely bypassing your client side protections. Unless i'm missing something here then this is wildly insucure to use in it's current implimentation



BS Buvana Sathasivam Syncfusion Team February 8, 2022 12:41 PM UTC

Hi Nicholas, 

To prevent cross-site request forgery (CSRF) attacks, an anti-forgery token is exchanged between the client and server. Please see the link below for more information on preventing CSRF attacks. 


Regards, 
Buvana S 


Loader.
Up arrow icon