I have developed an application using Outsystems service studio, in that application there is a file upload functionality, where user can upload a pdf file. I want to prevent XSS attack through hidden JavaScript code in the file. The javascript code is encrypted such that any user can only see raw text but when text is converted then javascript code is seen. So, how to prevent such file upload using outsystems and external code, What should happen is if I am able to detect the JavaScript code it should either raise an exception and show error message that file is invalid and prevent the data of the file from going in the data base
I have tried regex commands using c# and javascript code to match