emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: org-attach-directory should be safe [9.1.3 (9.1.3-10-gadfbfd-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20171127/)]
@ 2017-12-03 23:35 Allen Li
  2017-12-04 13:56 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Allen Li @ 2017-12-03 23:35 UTC (permalink / raw)
  To: emacs-orgmode

org-attach-directory should be safe to set as a file local or
directory local string.

This allows the user to set a directory local attachment directory for
all Org files in a directory tree recursively.

I do not believe there are any security issues to enable arbitrary Org
files to set org-attach-directory to a string value as the user would
have to explicitly initiate any attach operations.  The most dangerous
thing I can think of is an Org file setting the attachment directory
to the user's home directory and the user running the command to
delete all attachments.

Note that org-attach already allows setting the attachment directory
on a headline basis, this would just allow setting the attachment
directory on a file or directory basis.  It can be argued that the
existing functionality makes it more visible if a malicious Org file
sets a dangerous attachment path (a property on the headline vs a file
local variable or dir-locals file).  org-attach already mentions that
deleting all attachments is potentially dangerous and recommends
deleting through Dired.  Deleting through Dired would make it
impossible for a user to not notice that a malicious Org file has set
the attachment directory to something undesirable.

Emacs  : GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.19)
 of 2017-09-16
Package: Org mode version 9.1.3 (9.1.3-10-gadfbfd-elpaplus @
/home/ionasal/.emacs.d/elpa/org-plus-contrib-20171127/)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug: org-attach-directory should be safe [9.1.3 (9.1.3-10-gadfbfd-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20171127/)]
  2017-12-03 23:35 Bug: org-attach-directory should be safe [9.1.3 (9.1.3-10-gadfbfd-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20171127/)] Allen Li
@ 2017-12-04 13:56 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2017-12-04 13:56 UTC (permalink / raw)
  To: Allen Li; +Cc: emacs-orgmode

Hello,

Allen Li <vianchielfaura@gmail.com> writes:

> org-attach-directory should be safe to set as a file local or
> directory local string.
>
> This allows the user to set a directory local attachment directory for
> all Org files in a directory tree recursively.
>
> I do not believe there are any security issues to enable arbitrary Org
> files to set org-attach-directory to a string value as the user would
> have to explicitly initiate any attach operations.  The most dangerous
> thing I can think of is an Org file setting the attachment directory
> to the user's home directory and the user running the command to
> delete all attachments.

Fair enough. I added a :safe keyword to the defcustom.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-04 13:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-03 23:35 Bug: org-attach-directory should be safe [9.1.3 (9.1.3-10-gadfbfd-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20171127/)] Allen Li
2017-12-04 13:56 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).