[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/url/url-auth.el, v [EMACS_22_BASE]
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/url/url-auth.el, v [EMACS_22_BASE] |
Date: |
Mon, 25 Feb 2008 16:19:09 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Branch: EMACS_22_BASE
Changes by: Chong Yidong <cyd> 08/02/25 16:19:08
Index: url-auth.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/url/url-auth.el,v
retrieving revision 1.13.2.6
retrieving revision 1.13.2.7
diff -u -b -r1.13.2.6 -r1.13.2.7
--- url-auth.el 7 Jan 2008 02:23:04 -0000 1.13.2.6
+++ url-auth.el 25 Feb 2008 16:19:08 -0000 1.13.2.7
@@ -158,7 +158,7 @@
(setq file (cond
(realm realm)
((string-match "/$" file) file)
- (t (url-file-directory file)))
+ (t (url-basepath file)))
server (format "%s:%d" server port)
byserv (cdr-safe (assoc server url-digest-auth-storage)))
(cond
@@ -188,8 +188,8 @@
(string= data (substring file 0 (length data)))))
(setq retval (cdr (car byserv))))
(setq byserv (cdr byserv))))
- (if (or (and (not retval) prompt) overwrite)
- (progn
+ (if overwrite
+ (if (and (not retval) prompt)
(setq user (read-string (url-auth-user-prompt url realm)
(user-real-login-name))
pass (read-passwd "Password: ")
@@ -204,15 +204,24 @@
(cons (cons file retval) (cdr byserv))))))
(t (setq retval nil)))
(if retval
+ (if (cdr-safe (assoc "opaque" args))
(let ((nonce (or (cdr-safe (assoc "nonce" args)) "nonegiven"))
- (opaque (or (cdr-safe (assoc "opaque" args)) "nonegiven")))
+ (opaque (cdr-safe (assoc "opaque" args))))
(format
(concat "Digest username=\"%s\", realm=\"%s\","
"nonce=\"%s\", uri=\"%s\","
"response=\"%s\", opaque=\"%s\"")
(nth 0 retval) realm nonce (url-filename href)
(md5 (concat (nth 1 retval) ":" nonce ":"
- (nth 2 retval))) opaque))))))
+ (nth 2 retval))) opaque))
+ (let ((nonce (or (cdr-safe (assoc "nonce" args)) "nonegiven")))
+ (format
+ (concat "Digest username=\"%s\", realm=\"%s\","
+ "nonce=\"%s\", uri=\"%s\","
+ "response=\"%s\"")
+ (nth 0 retval) realm nonce (url-filename href)
+ (md5 (concat (nth 1 retval) ":" nonce ":"
+ (nth 2 retval))))))))))
(defvar url-registered-auth-schemes nil
"A list of the registered authorization schemes and various and sundry
- [Emacs-diffs] Changes to emacs/lisp/url/url-auth.el, v [EMACS_22_BASE],
Chong Yidong <=