There was a bug expecting the secure method to return a status code.
While STARTTLS does return a status code, this is already handled. If a positive result is recieved, a tls connection is negotiated, otherwise, an error is thrown. However, as the RFC states, the server does not send another status code after the successful negotioation, always leading to a Cannot read property 'charAt' of undefined exception in line 325.
Also, as the RFC states, the extensions list has to be reset after STARTTLS. This is mandatory because the server will also drop all state, send regular instead of enhanced status codes, leading to all other further method calls to fail if the library tries to decode them as enhanced status codes.
Also, the docs should probably state another greet() is required after a call to secure() to reestablish the extension list and start a transaction with the mx.
update dependencies
Also, a bunch of deprecation warnings and some vulnerabilities reported by npm audit are fixed by bumping the dependency versions
starttls bug
There was a bug expecting the
secure
method to return a status code. WhileSTARTTLS
does return a status code, this is already handled. If a positive result is recieved, a tls connection is negotiated, otherwise, an error is thrown. However, as the RFC states, the server does not send another status code after the successful negotioation, always leading to aCannot read property 'charAt' of undefined
exception in line 325.Also, as the RFC states, the extensions list has to be reset after
STARTTLS
. This is mandatory because the server will also drop all state, send regular instead of enhanced status codes, leading to all other further method calls to fail if the library tries to decode them as enhanced status codes.Also, the docs should probably state another
greet()
is required after a call tosecure()
to reestablish the extension list and start a transaction with the mx.update dependencies
Also, a bunch of deprecation warnings and some vulnerabilities reported by
npm audit
are fixed by bumping the dependency versions