From dfb02835d82f4629d2c01fd865d0fb22121887f5 Mon Sep 17 00:00:00 2001
From: magnum <magnum>
Date: Tue, 27 Sep 2011 01:12:49 +0200
Subject: [PATCH] j7: Fix for 8-bit usernames in NETLMv2 and NETNTLMv2

---
 src/NETLMv2_fmt_plug.c   |    2 +-
 src/NETNTLMv2_fmt_plug.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/NETLMv2_fmt_plug.c b/src/NETLMv2_fmt_plug.c
index 14cec11..9abf031 100644
--- a/src/NETLMv2_fmt_plug.c
+++ b/src/NETLMv2_fmt_plug.c
@@ -145,7 +145,7 @@ static int netlmv2_valid(char *ciphertext, struct fmt_main *pFmt)
 
   /* Validate Username and Domain Length */
   for (pos2 = pos; strncmp(pos2, "$", 1) != 0; pos2++)
-    if ( (*pos2 < 0x20) || (*pos2 > 0x7E) )
+    if (*pos2 < 0x20)
       return 0;
 
   if ( !(*pos2 && (pos2 - pos <= USERNAME_LENGTH + DOMAIN_LENGTH)) )
diff --git a/src/NETNTLMv2_fmt_plug.c b/src/NETNTLMv2_fmt_plug.c
index ace6f0d..35a7e45 100644
--- a/src/NETNTLMv2_fmt_plug.c
+++ b/src/NETNTLMv2_fmt_plug.c
@@ -152,7 +152,7 @@ static int netntlmv2_valid(char *ciphertext, struct fmt_main *pFmt)
 
   /* Validate Username and Domain Length */
   for (pos2 = pos; strncmp(pos2, "$", 1) != 0; pos2++)
-    if ( (*pos2 < 0x20) || (*pos2 > 0x7E) )
+    if (*pos2 < 0x20)
       return 0;
 
   if ( !(*pos2 && (pos2 - pos <= USERNAME_LENGTH + DOMAIN_LENGTH)) )
-- 
1.7.4.1

