REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 797 B
Close
//opt/cpanel/ea-ruby27/src/passenger-release-6.1.2/doc/TempFileHandling.md
Text
Base64
# Handling of temp files Always use unpredictable filenames for temp files. Failing to do so makes us vulnerable to symlink attacks, TOCTOU race conditions, file squatting, or even information disclosure and privilege escalation. Always use a tempfile creation strategy that atomically: 1. Finds a free filename, *and*, 2. Reserves that filename (failing if it already exists), *and*, 3. Restrict permissions to only the intended user (e.g. mode 0600), Doing these non-atomically makes us vulnerable to TOCTU race conditions. Implementation tips: - Use getSystemTempDir() - Use mkstemp() for single, regular files. Don't use it for non-regular files such as Unix sockets; use a temp dir instead. - Use mkdtemp() for creating a temp dir or for storing temp non-regular files. - mktemp() is bad.
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 3 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
DesignAspects
DIR
-
drwxr-xr-x
2026-02-13 08:03:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
images
DIR
-
drwxr-xr-x
2026-02-13 08:03:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
templates
DIR
-
drwxr-xr-x
2026-02-13 08:03:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AiInstructions.md
6.63 KB
lrw-r--r--
2026-01-27 23:50:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CodingTipsAndPitfalls.md
2.93 KB
lrw-r--r--
2026-01-27 23:50:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CxxMockingStrategy.md
982 B
lrw-r--r--
2026-01-27 23:50:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CxxTestingGuide.md
2.97 KB
lrw-r--r--
2026-01-27 23:50:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DebuggingAndStressTesting.md
4.95 KB
lrw-r--r--
2026-01-27 23:50:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DeveloperQuickstart.md
3.50 KB
lrw-r--r--
2026-01-27 23:50:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Packaging.md
12.53 KB
lrw-r--r--
2026-01-27 23:50:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TempFileHandling.md
797 B
lrw-r--r--
2026-01-27 23:50:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).