[Gambas-user] More authentication methods for gb.net.smtp

Benoît Minisini gambas at ...1...
Sun Nov 29 20:34:07 CET 2015


Le 29/11/2015 18:54, Tobias Boege a écrit :
> Hi Benoit,
>
> at present gb.net.smtp supports only AUTH PLAIN as authentication method.
> Hans Lehmann has modified the component to include AUTH LOGIN and CRAM-MD5.
> He said he tested it with his Freenet mail account which, in particular,
> supports CRAM-MD5.
>
> I have just corrected some logic errors in code flow (if one authentication
> method does not work, try the next, until one succeeds or we have no more
> methods available). Otherwise I have no clue about SMTP.
>
> Would you please review the attached patch and commit if it is good? You
> can apply the patch via IDE when you open the gb.net.smtp project.
>
> Regards,
> Tobi
>

I tried to apply the patch with the IDE "apply patch" window for the 
first time. It worked, but the patch dialog has many bugs: it opens in 
the "/home" directory, it does not refresh the bottom editor correctly, 
and applying the patch twice seems to be possible.

As for the contents of the patch:

+  If $hSession.LastCode = "334" Then Print "LastAnswer = "; 
$hSession.LastAnswer

What's that? A debugging thing?

+ sCommand = "echo -n '" & sChallenge & "' | openssl md5 -hmac " & "'" & 
sKey & "'"
+  Shell sCommand To sDigestHex

Quotes are not enough in a shell command if the quoted string already 
contains a quote.

-- 
Benoît Minisini




More information about the User mailing list