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

Benoît Minisini gambas at ...1...
Sun Nov 29 22:22:29 CET 2015


Le 29/11/2015 20:57, Tobias Boege a écrit :
> 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?

I don't know. If we are sure that applying a patch twice is not a 
problem, it's ok not to be able to detect it. But maybe you should clear 
the dialog once the patch has been applied, so that we know that 
everything was applied without error.

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

Let's suppose it is...

>
>> + 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? :-/

I did. :-) It's just for you so that you send the feedback to Hans Lehman.

Regards,

-- 
Benoît Minisini




More information about the User mailing list