Live data from Hacker News

Man who thought opening a TXT file is fine thought wrong

paulosyibelo.com

151–160 of 316 posts

Re: Man who thought opening a TXT file is fine thought wrong

#151

To this day osx still doesn't ship with a true plaintext gui editor.

It also doesn't ship with a paint program. OSx has a lot of ground to cover before it can function as a decent desktop OS.

One of the big reasons I switched in 2007 was the absence of absolute dreck like Paint.exe on a Mac. Instead, Apple focused on providing other types of apps for free, and now macOS comes with a full office suite and a prosumer sound editing program as things Windows doesn't have on first launch. Out of the box, macOS offers so much stuff today it's kind of incredible.

You want to draw? Use Notes, which has very little but enough to draw a quick idea you just had.

Re: Man who thought opening a TXT file is fine thought wrong

#152

Earlier quoted context omitted.

It also doesn't ship with a paint program. OSx has a lot of ground to cover before it can function as a decent desktop OS.

I too have been annoyed to not have a simple bundled paint program (I remmeber MacPaint!), but bundled application software is not really what determines whether an OS is a decent desktop OS.

I know it's not the same AT ALL, but there are drawing controls in Notes.app

Re: Man who thought opening a TXT file is fine thought wrong

#153

Earlier quoted context omitted.

I too have been annoyed to not have a simple bundled paint program (I remmeber MacPaint!), but bundled application software is not really what determines whether an OS is a decent desktop OS.

It's not the only factor, but definitely one of the most important ones.

I actually strongly disagree. Bundled applications which I don’t use and/or will replace with more powerful third party options just add clutter. There’s a balance to be sure, but I generally think OS’s bundle too many apps!

Re: Man who thought opening a TXT file is fine thought wrong

#154

Oh, man. The idea that TextEdit automatically parsed .txt files as HTML if they started with a certain file signature is problematic... ...but the fact that file:// schemes can access remote files by appending /net/ followed by a domain name is pretty shocking. I mean, the entire purpose of "file://" would seem to be to provide access to local/mounted files and only those. The fact that a Mac engineer thought it woul…

Looking in /etc/auto_master, which is the configuration for Autofs, the /net mount point is commented out by default. I do not know when (or if) it was ever turned on by default.

Whether or not a default configuration is vulnerable is a pretty typical component of accessing a vulnerability’s severity.

Unfortunate that the author didn’t mention this.

Obviously this doesn’t excuse the bug, but it’s important to contextualize if we hope to compare relative impact and have frank discussions.

Re: Man who thought opening a TXT file is fine thought wrong

#155

Hmm, I can't replicate this on my Mac running 10.9. printf ' ' > test.txt Opening test.txt shows the exact code I printed. Am I missing something?

the preferences allow you to set wether html is parsed or displayed as is. Perhaps it's due to that ?

Yep, was was it. I forgot I set that.

Some odd things are going on here though. The file is listed as “locked” when I open it, and if as TextEdit to unlock it, it fixes the file extension.

Re: Man who thought opening a TXT file is fine thought wrong

#156

File extensions are a kludge anyway. (And Windows 10 still hides them by default, because hey, backwards compatibility, and you wouldn't want to confuse Grandma who's seen the file be called "grandkids" since Windows 95..). Why should the filetype be dependent on the name? People even think renaming a .BMP to .JPG means now it's a compressed file! Old school Macs stored the filetype outside of a file, so you can rena…

Not really outside. The metadata was stored in a so-called "resource fork", with the file contents proper in a "data fork", both of which belonged to the file per se. Part of the resource fork was the "creator code", four bytes identifying the application which had created or could open the file, and the "type code", four more bytes defining which, among the potentially many kinds of files a given application could o…

Type and creator codes were stored in the desktop file IIRC, not in the resource fork.

Re: Man who thought opening a TXT file is fine thought wrong

#157
post #83

Earlier quoted context omitted.

Windows has a good handful of security vulnerabilities, but you'd be surprised by how few people actually "target" Windows devices. Windows still has accountability to their enterprise users, which means they spend most of their time mitigating the more serious stuff rather than some infected exe you'll find floating around the internet. MacOS and it's Unix heritage make it a pretty interesting case study for hackers…

>you'd be surprised by how few people actually "target" Windows devices What do you mean by this? As a percentage of malware it's not even close, Windows is far and away the most targeted platform: https://www.pcmag.com/news/windows-computers-account-for-83-...

Wow. I would have expected Android to be so much higher. For all the poorest people in the world who never owned a computer and have Internet access through an Android device, this is a great statistic.

Re: Man who thought opening a TXT file is fine thought wrong

#158
post #83

Earlier quoted context omitted.

>you'd be surprised by how few people actually "target" Windows devices What do you mean by this? As a percentage of malware it's not even close, Windows is far and away the most targeted platform: https://www.pcmag.com/news/windows-computers-account-for-83-...

It's also far and away the most used platform, so it should surprise nobody that it's the most targeted.

Android is way more common. https://en.wikipedia.org/wiki/Usage_share_of_operating_syste...

Re: Man who thought opening a TXT file is fine thought wrong

#159
post #130
post #67

Earlier quoted context omitted.

Agreed. This problem exists because someone wrote a tool that should only do one (really well) and but instead made it do five different things.

That sound in the background is emacs laughing.

You can press ctrl-super-meta-¥ to make it stop.

Re: Man who thought opening a TXT file is fine thought wrong

#160

> On the interface of TextEdit, it looked like you can do basic customization to your text (you can turn text bold, italic, change color etc...), I hate this about TextEdit. Is there a way to turn auto-formatting off? If I paste text, I want it to be stripped of any imported formatting.

when you open textedit you can change the mode to plain text with menu>format>make plain text.
Post reply on HN