Overview
| Artifact ID: | 22ad1c705beb8b32c7533a95c1db82e006d4b39b |
|---|---|
| Ticket: | 3118489fffffffffffffffffffffffffffffffff
NUL in filenames |
| User & Date: | andygoth on 2010-11-25 14:51:20 |
Changes
- assignee changed to: "vincentdarley"
- cmimetype changed to: "text/plain"
- comment changed to:
Some file commands treat NUL (\0) as a string terminator. Others treat it as a normal character. This inconsistency makes it possible to spoof commands that filter based on filename, particularly extension. Example: proc access {name} { if {[file extension $name] eq ".secret"} { error denied } else { puts granted open $name } } % access file.secret denied % access file.secret\0 granted file5 Generally, it's the commands that talk to the operating system that treat NUL as the string terminator. (More likely it's the operating system itself that does this!) For example, [open] and [cd] do this: % cd . % cd .\0 % cd \0. couldn't change working directory to "NUL.": no such file or directory # (in the previous line, NUL is a real NUL character; to see it, use tkcon instead of xterm) % file exists . 1 % file exists .\0 1 % file exists \0. 0 - foundin changed to: "obsolete: 8.6b1.1"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "andygoth"
- subsystem changed to: "37. File System"
- title changed to: "NUL in filenames"
- type changed to: "Bug"