aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Fitzsimmons2015-09-23 01:45:29 -0400
committerThomas Fitzsimmons2015-09-23 01:58:13 -0400
commit325200ac1dcf5bed6918ea827d8a48d89487e083 (patch)
treeaca494e28cdca4b1ff2708f8d93125c90d945e23
parenta4d5717e7bd53ce63624d5042586023a35b02d24 (diff)
downloademacs-325200ac1dcf5bed6918ea827d8a48d89487e083.tar.gz
emacs-325200ac1dcf5bed6918ea827d8a48d89487e083.zip
Do not include authorization header in an HTTP redirect
* lisp/url/url-http.el (url-http-parse-headers): Do not automatically include Authorization header in redirect. (Bug#21350)
-rw-r--r--lisp/url/url-http.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 6a7d8e2c947..7367a1eb3e9 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -25,8 +25,8 @@
25 25
26;;; Code: 26;;; Code:
27 27
28(require 'cl-lib)
28(eval-when-compile 29(eval-when-compile
29 (require 'cl-lib)
30 (require 'subr-x)) 30 (require 'subr-x))
31 31
32(defvar url-callback-arguments) 32(defvar url-callback-arguments)
@@ -646,6 +646,12 @@ should be shown to the user."
646 ;; compute the redirection relative to the URL of the proxy. 646 ;; compute the redirection relative to the URL of the proxy.
647 (setq redirect-uri 647 (setq redirect-uri
648 (url-expand-file-name redirect-uri url-http-target-url))) 648 (url-expand-file-name redirect-uri url-http-target-url)))
649 ;; Do not automatically include an authorization header in the
650 ;; redirect. If needed it will be regenerated by the relevant
651 ;; auth scheme when the new request happens.
652 (setq url-http-extra-headers
653 (cl-remove "Authorization"
654 url-http-extra-headers :key 'car :test 'equal))
649 (let ((url-request-method url-http-method) 655 (let ((url-request-method url-http-method)
650 (url-request-data url-http-data) 656 (url-request-data url-http-data)
651 (url-request-extra-headers url-http-extra-headers)) 657 (url-request-extra-headers url-http-extra-headers))