From b4d8c82e043f520ba1c2952c4f783a762dce0c6b Mon Sep 17 00:00:00 2001 From: FreeScout Date: Sat, 28 Mar 2020 20:44:51 -0700 Subject: [PATCH] Do not fetch from mailboxes with empty password --- app/Mailbox.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Mailbox.php b/app/Mailbox.php index e3e8da8f..23819ccf 100644 --- a/app/Mailbox.php +++ b/app/Mailbox.php @@ -125,7 +125,11 @@ class Mailbox extends Model */ public function setInPasswordAttribute($value) { - $this->attributes['in_password'] = encrypt($value); + if ($value != '') { + $this->attributes['in_password'] = encrypt($value); + } else { + $this->attributes['in_password'] = ''; + } } /**