diff options
| author | Chris Lamb <chris@chris-lamb.co.uk> | 2015-12-23 17:08:40 +0000 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-12-24 09:54:33 -0500 |
| commit | 77b8d8cb6d6d6345f479c68c4892291c1492ba7e (patch) | |
| tree | a42ca617d80dcaaa3db36069688e141e154c4dc1 /docs/topics | |
| parent | a856555df2a1b4ddad8bf21243de0bcbcc12fb20 (diff) | |
Discouraged use of /tmp with predictable names.
The use of predictable filenames in /tmp often leads to symlink attacks
so remove the most obvious use of them in the docs.
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/files.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/topics/files.txt b/docs/topics/files.txt index ce8a5c75a0..81b82e3d73 100644 --- a/docs/topics/files.txt +++ b/docs/topics/files.txt @@ -91,7 +91,7 @@ using a Python built-in ``file`` object:: >>> from django.core.files import File # Create a Python file object using open() - >>> f = open('/tmp/hello.world', 'w') + >>> f = open('/path/to/hello.world', 'w') >>> myfile = File(f) Now you can use any of the documented attributes and methods @@ -103,7 +103,7 @@ The following approach may be used to close files automatically:: >>> from django.core.files import File # Create a Python file object using open() and the with statement - >>> with open('/tmp/hello.world', 'w') as f: + >>> with open('/path/to/hello.world', 'w') as f: ... myfile = File(f) ... myfile.write('Hello World') ... |
