uvdesk / mailbox-component

The Mailbox component provides tools that allows your helpdesk to process tickets from multiple email sources.
MIT License
22 stars 38 forks source link

Missing email validation on settings saving and special characters in password made system broken #109

Open PeopleInside opened 9 months ago

PeopleInside commented 9 months ago

Description

There are two issues:

  1. No email credentials validation are done in SwitfMailer and in MailBox settings. If email details are wrong no error will be showed to the admin. This is bad. System should check if IMAP or SMTP are able to connect correctly before saving and print a green success message!

  2. Passwords with special character should not broken UVdesk email functionality. If an email address has special character in the password UVdesk UI will allow and save with a green message but SMTP will not work. I never test IMAP, maybe with IMAP the special character password are allowed? Means ticket will be created succesfully from email? Today with UVdesk 1.1.3 SMTP was not working because special characters was present on the email password.

Dont allow special character reduce the password security is bad and also user are not allerted from the UI that special characters are not allowed. Please allow it, made it work. They are acepted by the UI of UVdesk but SMTP then will not work. I never tested for IMAP.

How to reproduce

Create an helpdesk email with a special characters in the password field. Configure that address in MAilBox and SwiftMailer of UVdesk.

Even if you insert wrong credentials no error will be showed from UVdesk. Bad, very bad.

SMTP will not work if you use an email that has special characters in a password. Try to generate a ticket by the web interface and you will see email not sent.

I never tested with IMAP

Possible Solution

When email settings and credentials are entered in SwitfMailer and MailBox check if the system are able to connect. If all is fine show a green message as now, if somthing is wrong print an error message and let the user edit settings before accepting the saving.

Add special characters support in the password IMAP and SMTP and test UVdesk must be able to receive emails and create tickets and send email.

Currently if a special character is present in the password UVdesk never work correctly. SMTP will fail. IMAP (incoming email) not tested.

Please fix this two issues. Additional context