concept html in category security

This is an excerpt from Manning's book API Security in Action.
Cross-site scripting, or XSS, is a common vulnerability affecting web applications, in which an attacker can cause a script to execute in the context of another site. In a persistent XSS, the script is stored in data on the server and then executed whenever a user accesses that data through the web application. A reflected XSS occurs when a maliciously crafted input to a request causes the script to be included (reflected) in the response to that request. Reflected XSS is slightly harder to exploit because a victim has to be tricked into visiting a website under the attacker's control to trigger the attack. A third type of XSS, known as DOM-based XSS, attacks JavaScript code that dynamically creates HTML in the browser.
The HTML for the login page is very similar to the existing HTML for the Create Space page that you created earlier. As before it has a simple form with two input fields for the username and password, with some simple CSS to style it. Use an input with
type="password"to ensure that the browser hides the password from anybody watching over the user’s shoulder. To create the new page, navigate to src/main/resources/public and create a new file named login.html. Type the contents of listing 4.14 into the new file and click save. You’ll need to rebuild and restart the API for the new page to become available, but first you need to implement the JavaScript login logic.Listing 4.14 The login form HTML
<!DOCTYPE html> <html> <head> <title>Natter!</title> <script type="text/javascript" src="login.js"></script> <style type="text/css"> input { margin-right: 100% } #A </style> </head> <body> <h2>Login</h2> <form id="login"> <label>Username: <input name="username" type="text" #B id="username"> #B </label> #B <label>Password: <input name="password" type="password" #C id="password"> #C </label> #C <button type="submit">Login</button> </form> </body> </html>