It’s well known that if you drag a file from Finder and drop it into Terminal, the full path of the file will output in Terminal. The same behavior occurs with copy and paste too. This has always been a very convenient but innocuous operation… until macOS 10.15 Catalina. I’ve discovered that on Catalina, pasting a file from Finder not only outputs the file path in Terminal, it also invisibly and permanently grants Terminal access to the file, bypassing any macOS privacy protections!
This is such a weird bug… Or feature?
While it was undocumented, it was a bug. Now that it’s discovered, and (externally) documented, Apple will retroactively declare “it’s a feature.”
Is this a new feature, or just that it’s something only recently been noticed by the author?
I recall doing this, or something very similar, a decade ago. As I recall if you had administrative rights this worked in much earlier versions of MacOS, I’m sure we used it to debug normal user accounts.
Maybe this is not specific to the Terminal program? Does this happen for other applications like text editors as a way to convey “user granted access by dragging and dropping the file” for (possibly legacy) programs?
I wouldn’t be surprised if this is a more general “compatibility feature” put into place after access restrictions were introduced to the OS in order to prevent breaking previously working behavior.
Edit: correct auto correct mistakes