#22504 closed Bug (fixed)
Wrong terminology (TLD/SLD) in docs: /topics/security/
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
/topics/security says about leveraging the same-origin policy:
One class of attacks can be prevented by always serving user uploaded content from a distinct Top Level Domain (TLD). This prevents any exploit blocked by same-origin policy protections such as cross site scripting. For example, if your site runs on example.com, you would want to serve uploaded content (the MEDIA_URL setting) from something like usercontent-example.com. It’s not sufficient to serve content from a subdomain like usercontent.example.com.
The term "Top Level Domain" is wrong and should be replaced by "second-level domain". In this example, the TLD is .com, but the example emphasizes the difference between "example.com" and "usercontent-example.com", which are different SLDs sharing the same TLD.
Attachments (2)
Change History (8)
by , 11 years ago
Attachment: | 22504.diff added |
---|
comment:1 by , 11 years ago
Has patch: | set |
---|
comment:2 by , 11 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
This is definitely a mistake, and something we should improve. The only thing I'm not sure about is the specific suggestion to have the Django app on example.com, and the user content on example.net. Although this will certainly work, it's a lot less obvious. In most cases, users who own both example.net and example.com would redirect one to the other. So this feels more error-prone. Perhaps we should leave the examples as they are currently.
comment:3 by , 11 years ago
Patch needs improvement: | unset |
---|
Agreed, updated. I left the option of serving from a different top-level domain in, but reverted the addition of an example for that.
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Suggested wording.