diff -urN ../roundcubemail-1.6.1.orig/program/actions/mail/attachment_upload.php ./program/actions/mail/attachment_upload.php --- ../roundcubemail-1.6.1.orig/program/actions/mail/attachment_upload.php 2023-01-23 22:03:14.000000000 +0200 +++ ./program/actions/mail/attachment_upload.php 2023-04-15 16:01:26.386602000 +0300 @@ -65,7 +65,8 @@ if ( $host == $url['host'] - && $port == $url['port'] +// && $port == $url['port'] + && (isset($url['port']) && $port == $url['port']) && $rcmail->get_user_name() == rawurldecode($url['user']) ) { $message = new rcube_message($params['_uid'], $params['_mbox']); @@ -184,7 +185,7 @@ public static function get_attachment() { - return self::$COMPOSE['attachments'][self::$file_id]; + return isset(self::$COMPOSE['attachments'][self::$file_id]) ? self::$COMPOSE['attachments'][self::$file_id] : null; } public static function attachment_success($attachment, $uploadid)