emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/url/url-auth.el,v


From: John Wiegley
Subject: [Emacs-diffs] Changes to emacs/lisp/url/url-auth.el,v
Date: Tue, 29 Jan 2008 03:52:05 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     John Wiegley <johnw>    08/01/29 03:52:05

Index: url-auth.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/url/url-auth.el,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- url-auth.el 8 Jan 2008 20:45:28 -0000       1.20
+++ url-auth.el 29 Jan 2008 03:52:05 -0000      1.21
@@ -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




reply via email to

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