On Tue, 3 Dec 2013, Steve Holme wrote:

As can be seen with lines 7 and 13, the client sends the AUTH command with the appropriate SASL authentication mechanism. The first time requesting NTLM and the second time requesting LOGIN (after downgrading due to a bad NTLM type-2 response from the server). As such the test server needs to send different responses, but unfortunately, I can’t specify the following in a test case as ftpserver.pl currently stands:

<reply>
<servercmd>
AUTH LOGIN NTLM
REPLY AUTH 334 NTLM Accepted
REPLY AUTH 334 VXNlcm5hbWU6
</servercmd>
</reply>

Here's an idea:

Make the "REPLY" logic first check to see if it has a replacement for the _full_ command line and if it has, don't replace for just the command. That would allow the test cases to look something like:

  REPLY "AUTH NTLM" 334 NTLM Accepted
  REPLY "AUTH LOGIN" 334 VXNlcm5hbWU6

... alternatively, we add a separate keyword for that full command line replacement instead of overloading the existing REPLY, like:

  FULLCMD "AUTH NTLM" 334 NTLM Accepted
  FULLCMD "AUTH LOGIN" 334 VXNlcm5hbWU6

Good enough?

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to