emacs-diffs
[Top][All Lists]
Advanced

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

master ccba86b: Use unibyte strings in ntlm auth requests and responses


From: Mattias Engdegård
Subject: master ccba86b: Use unibyte strings in ntlm auth requests and responses
Date: Wed, 22 Dec 2021 10:34:47 -0500 (EST)

branch: master
commit ccba86be78586d4b16da288bcc6b3c473b9fd422
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    Use unibyte strings in ntlm auth requests and responses
    
    * lisp/net/ntlm.el (ntlm-build-auth-request)
    (ntlm-build-auth-response): Make sure to use unibyte strings for bytes
    greater than 127, or base64 encoding will fail.
    This should fix failures in ntlm-tests.
---
 lisp/net/ntlm.el | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/lisp/net/ntlm.el b/lisp/net/ntlm.el
index 0e0146d..fed93dd 100644
--- a/lisp/net/ntlm.el
+++ b/lisp/net/ntlm.el
@@ -102,9 +102,7 @@ is not given."
   (let ((request-ident (concat "NTLMSSP" (make-string 1 0)))
        (request-msgType (concat (make-string 1 1) (make-string 3 0)))
                                        ;0x01 0x00 0x00 0x00
-       (request-flags (concat (make-string 1 7) (make-string 1 130)
-                              (make-string 1 8) (make-string 1 0)))
-                                       ;0x07 0x82 0x08 0x00
+       (request-flags (unibyte-string #x07 #x82 #x08 #x00))
        )
     (when (and user (string-match "@" user))
       (unless domain
@@ -245,9 +243,7 @@ by PASSWORD-HASHES.  PASSWORD-HASHES should be a return 
value of
         ;;(msgType (substring rchallenge 8 12))        ;msgType, 4 bytes
         (uDomain (substring rchallenge 12 20)) ;uDomain, 8 bytes
         ;; match default setting in `ntlm-build-auth-request'
-        (request-flags (concat (make-string 1 7) (make-string 1 130)
-                               (make-string 1 8) (make-string 1 0)))
-                                       ;0x07 0x82 0x08 0x00
+        (request-flags (unibyte-string #x07 #x82 #x08 #x00))
         (flags (substring rchallenge 20 24))   ;flags, 4 bytes
         (challengeData (substring rchallenge 24 32)) ;challengeData, 8 bytes
          ;; Extract domain string from challenge string.



reply via email to

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