TextEdit data loss concerns
Over at MacOSXHints, Rob G. has posted a must-read article about possible data loss from TextEdit's Save dialog. The problem stems from TextEdit's (and Cocoa's) willingness to overwrite entire folders with text files.
This data security hole seems to occur because "bundle" style files (which are actually folders and not single files) are considered on-par with flat files in OS X. TextEdit does not seem to check to ensure that the folder being replaced is actually a bundle and not, say, your entire home directory. It's an important article to read and a bug that you need to be aware of.
Share
Categories
Over at MacOSXHints, Rob G. has posted a must-read article about possible data loss from TextEdit's Save dialog. The problem stems from...
Add a Comment
The first poster is wrong. File and folders are not equal in UNIX/linux. There are different system calls and semantics for each. Directories cannot be accidently removed when the expected destination is a file. The open call will fail with EISDIR (Is a directory). This is a GUI problem.
Note that Cocoa save dialogs will present a warning panel that says:
-----
"directory" already exists. Do you want to replace it?
A file or folder with the same name already exists in daryn. Replacing it will overwrite its current contents.
Cancel Replace
-----
The user is given fair warning, but most users will never even accidently see this panel. Consider how many files are saved with no extension. Very few. This is a contrived example of a non-problem.
Not so much "data security" as it is "data integrity."
December 20 2006 at 5:43 PM Report abuse Permalink rate up rate down Replyactually all UNIXes work like that, files and folders are equal, same thing with linux. it's not a flaw, it's like that by design. i remember this one time when i tried to copy paste a C header file to another directory and i just slapped it in a directory with the rest of the header files. or so i thought, turned out i had overwritten the folder, lol.
December 20 2006 at 1:59 PM Report abuse Permalink rate up rate down ReplyHot Apps on TUAW
Deals of the Day
more deals- Altec Lansing Octiv Duo iDock for $48 + free shipping
- Used Apple iMac 17" Core Duo 1.83GHz for $430 + $28 s&h
- Lounge Deluxe Stand for iPhone / iPod touch for $28 + $8 s&h
- Brookstone Surround-Sound Earbuds for $14 + $7 s&h
- Refurbished Skullcandy Tokidoki Smokin' Buds Mic'd Headset for $5 + $2 s&h
- Stitchway Backup Battery for iPod / iPhone for $5 + free shipping
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



3 Comments