Project

General

Profile

Actions

Bug #11384

closed

Wt::Mail::Client throws on connect, segfaults on send when not connected

Added by Roel Standaert about 1 year ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Roel Standaert
Target version:
Start date:
02/28/2023
Due date:
% Done:

100%

Estimated time:

Description

The following forum post got me to look at Wt::Mail::Client: https://redmine.emweb.be/boards/2/topics/18269

I observed the following:

  • If the resolver fails, Client::connect throws an exception instead of returning false (as documented)
  • If the client is not connected, and Client::send is used, this will result in a null pointer dereference, this can be due to:
    • the user forgetting to call connect
    • similarly, send being called after disconnect
    • connect being used with TransportEncryption set to anything other than None, but Wt is built without OpenSSL (Wt will log "TLS requested, but Wt built without OpenSSL").

I think we should fix the client so:

  • Client::connect logs an error and returns false if the resolver fails (matching the documentation)
  • Client::send logs an error and returns false if the client is not connected
Actions #1

Updated by Roel Standaert about 1 year ago

  • Status changed from New to InProgress
Actions #2

Updated by Roel Standaert about 1 year ago

  • Status changed from InProgress to Review
  • Assignee deleted (Roel Standaert)
Actions #3

Updated by Roel Standaert about 1 year ago

  • Status changed from Review to Implemented @Emweb
  • Assignee set to Roel Standaert
  • % Done changed from 0 to 100
Actions #4

Updated by Roel Standaert about 1 year ago

  • Status changed from Implemented @Emweb to Resolved
Actions #5

Updated by Matthias Van Ceulebroeck 11 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF