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

Tobias Boege taboege at ...626...
Sun Nov 29 20:57:24 CET 2015


On Sun, 29 Nov 2015, Beno??t Minisini wrote:
> 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.
> 

I can't (or shouldn't try to) detect whether a patch has already been
applied or not. You mean I should disable the Apply button once it has
been clicked?

> As for the contents of the patch:
> 
> +  If $hSession.LastCode = "334" Then Print "LastAnswer = "; 
> $hSession.LastAnswer
> 
> What's that? A debugging thing?
> 

Sigh, I don't know...

> + 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.
> 

Maybe the patch suffices to get the idea across, and you can write the code
properly? :-/

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list