From: jari.aalto@poboxes.com (Jari Aalto+mail.linux)
Subject: [patch] 21.3 add-log.el::add-log-mailing-address security (spam)
Date: Sun, 04 Apr 2004 17:06:07 +0300 [thread overview]
Message-ID: <k70v3kj4.fsf@blue.sea.net> (raw)
The following change will help selecting more appropriate default for
displayed identity in ChangeLogs. This helps fighting against spam
harversters by not letting then simply rip out all that looks like
"@". This is naturally tip of the iceberg, but I believe any measure
to improve security should be included in Emacs as well.
2004-04-04 Jari Aalto <jari dot aalto _A@T_ poboxes dot com>
* add-log.el (add-log-mailing-address): Refer to
`add-log-user-mail-address' and suggest email
addrress that prevents spam.
(add-log-user-mail-address): New. Spam protect
`user-mail-address'.
(add-change-log-entry): Use `add-log-user-mail-address'.
Index: add-log.el
===================================================================
RCS file: /cygdrive/h/data/version-control/cvsroot/emacs/gnu-emacs/lisp213/add-log.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -IId: -c -r1.1 -r1.2
cvs diff: conflicting specifications of output style
*** add-log.el 26 Jun 2003 18:06:05 -0000 1.1
--- add-log.el 4 Apr 2004 14:00:16 -0000 1.2
***************
*** 68,74 ****
;;;###autoload
(defcustom add-log-mailing-address nil
"*Electronic mail address of user, for inclusion in ChangeLog daily headers.
! This defaults to the value of `user-mail-address'."
:type '(choice (const :tag "Default" nil)
string)
:group 'change-log)
--- 68,79 ----
;;;###autoload
(defcustom add-log-mailing-address nil
"*Electronic mail address of user, for inclusion in ChangeLog daily headers.
! This defaults to the value of function `add-log-user-mail-address'.
! If you set this yourself, consider using some Spam protected email format,
! which could be:
!
! john.doe _A T_ example.com
! john DOT doe _AT_ example DOT com"
:type '(choice (const :tag "Default" nil)
string)
:group 'change-log)
***************
*** 400,405 ****
--- 405,418 ----
(file-name-sans-versions buffer-file)
buffer-file))))
+ (defun add-log-user-mail-address ()
+ "Return protected version of `user-rmail-address'."
+ (and (stringp user-mail-address)
+ (string-match "@" user-mail-address)
+ ;; ' AT ' is too common, so use something else to
+ ;; make Unsolicited bulk email (spam) harvester's work harder.
+ (replace-match " _A T_ " nil nil user-mail-address)))
+
;;;###autoload
(defun add-change-log-entry (&optional whoami file-name other-window new-entry)
"Find change log file and add an entry for today.
***************
*** 419,425 ****
(or add-log-full-name
(setq add-log-full-name (user-full-name)))
(or add-log-mailing-address
! (setq add-log-mailing-address user-mail-address))
(if whoami
(progn
(setq add-log-full-name (read-input "Full name: " add-log-full-name))
--- 432,439 ----
(or add-log-full-name
(setq add-log-full-name (user-full-name)))
(or add-log-mailing-address
! (setq add-log-mailing-address
! (add-log-user-mail-address)))
(if whoami
(progn
(setq add-log-full-name (read-input "Full name: " add-log-full-name))
--
http://tiny-tools.sourceforge.net/
Swatch @time http://www.mir.com.my/iTime/itime.htm
http://www.ryanthiessen.com/swatch/resources.htm
Use Licenses! http://www.linuxjournal.com/article.php?sid=6225
Which Licence? http://www.linuxjournal.com/article.php?sid=4825
OSI Licences http://www.opensource.org/licenses/
reply other threads:[~2004-04-04 14:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=k70v3kj4.fsf@blue.sea.net \
--to=jari.aalto@poboxes.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.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).