← Cybersecurity

Network and web security

Web application security

Web应用安全

Web applications are a common target because they are open to everyone on the internet. The OWASP organisation publishes a list of the ten most serious web security risks that developers and testers rely on.

One of the best known is SQL injection: the attacker types database commands into an input field, and if the app does not check its input it runs them, possibly exposing all user data.

Another is cross-site scripting (XSS): the attacker plants code in a page that others visit, so it runs in their browsers and may steal their sessions.

The basic defence: never trust user input; validate it, use parameterised queries for the database and escape special characters before showing text on a page.

Other key practices: give each part the least privilege it needs, keep the libraries you use updated, and run a penetration test before launch.

Ask the AI assistant

Ask anything about this lesson and get a simple answer with the terms in Chinese, Arabic and English.

The AI assistant runs on Google's Gemini model and can make mistakes. Do not write personal information. Available to signed-in learners, up to 30 requests a day.

The content is simplified and covers the basics only.