easy5 pts · first answer countsweb-securityxss
Writing location.hash into the page
This code shows a welcome name taken from the URL fragment. What is the problem?
const name = decodeURIComponent(location.hash.slice(1))
document.getElementById('hi').innerHTML = 'Hello ' + nameDiscussion 0
Join free to post in the discussion.
Related questions
- What HttpOnly doesFull Stack Developer
- What HTTPS protectsFull Stack Developer
- Caching a bank statement pageFull Stack Developer
- Stored versus reflected XSSFull Stack Developer
- Encoding user text inside HTMLFull Stack Developer
- What the Secure cookie flag doesFull Stack Developer
- Purpose of Strict-Transport-SecurityFull Stack Developer
- X-Content-Type-Options: nosniffFull Stack Developer