A problem has not been clarified about data processing. User submitted information-1-warehouse receiving-2-frontend call-up how does this process prevent xss injection and html processing? A problem has not been clarified about data processing.
User submitted information-1-warehouse receiving-2-frontend call-up
How does this process prevent xss injection and html processing?
Reply content:
A problem has not been clarified about data processing.
User submitted information-1-warehouse receiving-2-frontend call-up
How does this process prevent xss injection and html processing?
I don't know whether you are talking about XSS or XSS and injection. Generally, injection refers to SQL injection.
The reason you are confused is that you do not know much about XSS. To put it simply, I posted content on your website (such as comments), which contains Javascript code, however, your website does not filter the content published by users, which causes people after me to run the Javascript code I published when opening this page, if I am a qualified programmer, I can basically use this code to do everything. For example, if your website is a social networking website, I can capture packets for actions such as forward, follow, like, and share, and analyze the POST or GET format, then, perform operations in Javascript. For example, follow me first, and then share my comments with your friends. You can see that this is a vicious circle and a tipping point, theoretically, this can affect the vast majority of users of a social network. This is called XSS.
It makes sense not to trust or listen to any user in the early years, but you do not know where your visitor is and what purpose it has. From his input information to display his information in any form (comments, topic posts, and insite emails, as long as all input information is involved, you must process this content to check whether it contains dangerous content. Generally, it is processed before it is stored in the database, and can be processed together with possible SQL injections. Another SQL type is user input (including $ _ GET, $ _ POST), which may endanger the security of your database, experienced people will guess the SQL statement used in your program (for example, your content address is http://yourdomain.com /? Id = 23. Obviously, the bitwise in your program is SELECT id, name FROM xxx WHERE id = 23). It will add something behind the URL. The simplest is or 1 = 1, make the query results of any statement true, which is too harmful if the user logs on. For more information, see.
I have seen many PHP projects with XSS filters being open source libraries: http://htmlpurifier.org/
To put it simply, you need to check user input before entering the database. This is usually anti-SQL injection. Then, properly escape the information displayed on the page. This is usually anti-XSS.