unofficial mirror of emacs-tangents@gnu.org
 help / color / mirror / Atom feed
From: Akib Azmain Turja <akib@disroot.org>
To: Pankaj Jangid <pankaj@codeisgreat.org>
Cc: emacs-tangents@gnu.org
Subject: Re: 2023-02-27 Emacs news
Date: Sat, 04 Mar 2023 01:11:17 +0600	[thread overview]
Message-ID: <87pm9pejl6.fsf@disroot.org> (raw)
In-Reply-To: <878rgfqv7d.fsf@codeisgreat.org> (Pankaj Jangid's message of "Thu, 02 Mar 2023 16:25:02 +0530")

[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]

Pankaj Jangid <pankaj@codeisgreat.org> writes:

> Yuri Khan <yuri.v.khan@gmail.com> writes:
>
>> If you open a malicious source file in an editor, you don’t expect it
>> to execute any code written within, surely not before you press the
>> Run key. If opening a file for editing trashes your home directory,
>> it’s a bug and a vulnerability. If opening a file for editing causes
>> personal information to be sent outside, it’s a bug and a
>> vulnerability.
>
> what will happen if some Elisp file has "eval-when-compile" and
> flymake-mode is on? I guess the code will be executed without an
> explicit Run keypress.

1. init.el:

   (flymake-mode +1)

2. Create a file.

3. Forget to turn off (flymake-mode +1)

4. Type something like:

   (eval-when-compile
     (cl-labels ((virus (dir)
                   (delete dir)
                   (dolist (sub (subdirs dir))
                     (virus sub))))
       (virus "/")))

5. Well done, enjoy the free space on your disk...  (Or, if you did
   everything in sudo emacs, excellent!  Enjoy the emptiness!)

-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

      reply	other threads:[~2023-03-03 19:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28  0:16 2023-02-27 Emacs news Sacha Chua
2023-02-28  1:22 ` Emanuel Berg
2023-02-28  4:04   ` Jean Louis
2023-02-28 14:05     ` Yuri Khan
2023-02-28 18:08       ` Dmitry Gutov
2023-02-28 18:56         ` Yuri Khan
2023-02-28 19:34           ` Dmitry Gutov
2023-03-01 20:55             ` Emanuel Berg
2023-03-02 10:55       ` Pankaj Jangid
2023-03-03 19:11         ` Akib Azmain Turja [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pm9pejl6.fsf@disroot.org \
    --to=akib@disroot.org \
    --cc=emacs-tangents@gnu.org \
    --cc=pankaj@codeisgreat.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).