September 2024
Intermediate to advanced
743 pages
27h 48m
English
In Section 20.1.8, you learned that injecting malicious JavaScript code into a web page is one of the major vulnerabilities for web applications.
To lessen this vulnerability, I want to discuss three terms important in this context:
Same-origin policy (SOP)
Content Security Policy (CSP)
Cross-Origin Resource Sharing (CORS)
An SOP basically states that code from one origin must not access content from another origin. Thus, JavaScript executed in the browser can only access resources of the same domain via HTTP, but the dynamic loading of resources from another domain—the execution of cross-origin requests—is prevented. ...
Read now
Unlock full access