From 0c0ddf27087581efa81045998315d34df440fad2 Mon Sep 17 00:00:00 2001 From: bg66 Date: Tue, 16 Jan 2007 01:44:27 +0000 Subject: [PATCH] * mixi.el (mixi-login-use-ssl): New user option. (mixi-login): Use it. --- ChangeLog | 5 +++++ mixi.el | 30 +++++++++++++++++++----------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7c0cd5d..883e792 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-01-16 OHASHI Akira + + * mixi.el (mixi-login-use-ssl): New user option. + (mixi-login): Use it. + 2007-01-15 OHASHI Akira * mixi.el (mixi-diary-list-regexp): Fix regexp. diff --git a/mixi.el b/mixi.el index 789ba27..03a4c28 100644 --- a/mixi.el +++ b/mixi.el @@ -172,6 +172,11 @@ (symbol :tag "The other backend")) :group 'mixi) +(defcustom mixi-login-use-ssl nil + "*If non-ni, login using SSL." + :type 'boolean + :group 'mixi) + (defcustom mixi-default-email nil "*Default E-mail address that is used to login automatically." :type '(radio (string :tag "E-mail address") @@ -381,17 +386,20 @@ Increase this value when unexpected error frequently occurs." (read-from-minibuffer (mixi-message "Login Email: ")))) (password (or password mixi-default-password (read-passwd (mixi-message "Login Password: "))))) - (let ((buffer (mixi-retrieve "/login.pl" - (concat "email=" email - "&password=" password - "&next_url=/home.pl" - "&sticky=on")))) - (unless (string-match "url=/check\\.pl\\?n=" buffer) - (error (mixi-message "Cannot login"))) - (setq buffer (mixi-retrieve "/check.pl?n=home.pl")) - (if (string-match mixi-my-id-regexp buffer) - (setq mixi-me (mixi-make-friend (match-string 1 buffer))) - (error (mixi-message "Cannot login")))))) + (let ((url "/login.pl")) + (when mixi-login-use-ssl + (setq url (concat "https://mixi.jp" url))) + (let ((buffer (mixi-retrieve url + (concat "email=" email + "&password=" password + "&next_url=/home.pl" + "&sticky=on")))) + (unless (string-match "url=/check\\.pl\\?n=" buffer) + (error (mixi-message "Cannot login"))) + (setq buffer (mixi-retrieve "/check.pl?n=home.pl")) + (if (string-match mixi-my-id-regexp buffer) + (setq mixi-me (mixi-make-friend (match-string 1 buffer))) + (error (mixi-message "Cannot login"))))))) (defun mixi-logout () (mixi-retrieve "/logout.pl")) -- 1.7.10.4