bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24274: 24.5; Use auth-source library for remote passwords in Rmail


From: Ivan Shmakov
Subject: bug#24274: 24.5; Use auth-source library for remote passwords in Rmail
Date: Sun, 21 Aug 2016 19:30:43 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

>>>>> Viktor Slavkovik <viktor.slavkovik@gmail.com> writes:
>>>>> Ivan Shmakov <ivan@siamics.net> writes:

[…]

 >> The auth-source-search function will prompt for password
 >> automatically if given ‘:create t’ among its parameters, making
 >> explicit read-passwd unnecessary.  (But check also the
 >> auth-source-creation-prompts variable.)

[…]

 > I've made an update (attached) to the previous patch.  I removed the
 > code indentation spaces and changed the docstring to be more
 > descriptive.  Also, I included a function check for the auth-source
 > password which was missing before.

 > !                 (if found
 > !                     (progn
 > !                       (setq secret (plist-get found :secret))
 > !                       (if (functionp secret)
 > !                         (funcall secret)))

        There, rmail-remote-password will end up being set to nil if
        ‘secret’ is /not/ a function.  Compare:

                    (progn
                      (setq secret (plist-get found :secret))
                      (if (functionp secret)
                          (funcall secret)
                        secret))

 > I don't think that the ':create' parameter of auth-source-search
 > should be used here, since we don't know if the authentication will
 > be successful.

        We can call auth-source-forget+ if necessary once we figure it
        out; just like it’s done in gnus/nnimap.el and mail/smtpmail.el.

 > Content-Type: application/octet-stream

        I’d appreciate for the patches to come marked as something
        text/*, so that MIME-aware mail user agents could just display
        them (as opposed to: ask user to save one into a file.)  I guess
        that such a Content-Type: will be emitted automatically when the
        filename of the file being attached ends with .diff or .patch.

 > Content-Disposition: attachment; filename=patch_update
 > Content-Transfer-Encoding: base64
 > Content-Description: updated patch

-- 
FSF associate member #7257  http://am-1.org/~ivan/      … 3013 B6A0 230E 334A





reply via email to

[Prev in Thread] Current Thread [Next in Thread]