Skip to content

Commit

Permalink
Fix IMAP RFC822 'From' header parsing issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
mobizt committed Mar 27, 2024
1 parent 5c6e231 commit bda5e84
Show file tree
Hide file tree
Showing 300 changed files with 600 additions and 302 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ESP Mail Client",
"version": "3.4.16",
"version": "3.4.18",
"keywords": "communication, email, imap, smtp, esp32, esp8266, samd, arduino",
"description": "Arduino E-Mail Client Library to send, read and get incoming email notification for ESP32, ESP8266 and SAMD21 devices. The library also supported other Arduino Devices using Clients interfaces e.g. WiFiClient, EthernetClient, and GSMClient.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name=ESP Mail Client

version=3.4.16
version=3.4.18

author=Mobizt

Expand Down
4 changes: 2 additions & 2 deletions src/ESP_Mail_Client_Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#ifndef ESP_MAIL_VERSION

#define ESP_MAIL_VERSION "3.4.16"
#define ESP_MAIL_VERSION_NUM 30416
#define ESP_MAIL_VERSION "3.4.18"
#define ESP_MAIL_VERSION_NUM 30418

/* The inconsistent file version checking to prevent mixed versions compilation. */
//#define VALID_VERSION_CHECK(ver) (ver == ESP_MAIL_VERSION_NUM)
Expand Down
4 changes: 2 additions & 2 deletions src/ESP_Mail_IMAP.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/**
* Mail Client Arduino Library for Espressif's ESP32 and ESP8266, Raspberry Pi RP2040 Pico, and SAMD21 with u-blox NINA-W102 WiFi/Bluetooth module
*
* Created August 28, 2023
* Created March 27, 2024
*
* This library allows Espressif's ESP32, ESP8266, SAMD and RP2040 Pico devices to send and read Email through the SMTP and IMAP servers.
*
Expand Down Expand Up @@ -3378,7 +3378,7 @@ void ESP_Mail_Client::addHeaderItem(MB_String &str, esp_mail_message_header_t *h

int ESP_Mail_Client::getRFC822HeaderPtr(int index, esp_mail_imap_rfc822_msg_header_item_t *header)
{
if (index > esp_mail_rfc822_header_field_from && index < esp_mail_rfc822_header_field_maxType)
if (index >= esp_mail_rfc822_header_field_from && index < esp_mail_rfc822_header_field_maxType)
return toAddr(header->header_items[index]);
return 0;
}
Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_big_cbcdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_BIG_CBCDEC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_BIG_CBCDEC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_big_cbcenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_BIG_CBCENC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_BIG_CBCENC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_big_ctr.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_BIG_CTR_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_BIG_CTR_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_big_ctrcbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_BIG_CTRCBC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_BIG_CTRCBC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_big_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_BIG_DEC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_BIG_DEC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_big_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_BIG_ENC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_BIG_ENC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_COMMON_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_COMMON_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_ct.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_CT_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_CT_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_ct64.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_CT64_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_CT64_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_ct64_cbcdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_CT64_CBCDEC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_CT64_CBCDEC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_ct64_cbcenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_CT64_CBCENC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_CT64_CBCENC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_ct64_ctr.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_CT64_CTR_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_CT64_CTR_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_ct64_ctrcbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_CT64_CTRCBC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_CT64_CTRCBC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_ct64_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_CT64_DEC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_CT64_DEC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_ct64_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_CT64_ENC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_CT64_ENC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_ct_cbcdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_CT_CBCDEC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_CT_CBCDEC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_ct_cbcenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_CT_CBCENC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_CT_CBCENC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_ct_ctr.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_CT_CTR_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_CT_CTR_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_ct_ctrcbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_CT_CTRCBC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_CT_CTRCBC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_ct_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_CT_DEC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_CT_DEC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_ct_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_CT_ENC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_CT_ENC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_pwr8.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_PWR8_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_PWR8_C

#define BR_POWER_ASM_MACROS 1
#include "inner.h"
Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_pwr8_cbcdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_PWR8_CBCDEC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_PWR8_CBCDEC_C

#define BR_POWER_ASM_MACROS 1
#include "inner.h"
Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_pwr8_cbcenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_PWR8_CBCENC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_PWR8_CBCENC_C

#define BR_POWER_ASM_MACROS 1
#include "inner.h"
Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_pwr8_ctr.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_PWR8_CTR_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_PWR8_CTR_C

#define BR_POWER_ASM_MACROS 1
#include "inner.h"
Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_pwr8_ctrcbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_PWR8_CTRCBC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_PWR8_CTRCBC_C

#define BR_POWER_ASM_MACROS 1
#include "inner.h"
Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_small_cbcdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_SMALL_CBCDEC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_SMALL_CBCDEC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_small_cbcenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_SMALL_CBCENC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_SMALL_CBCENC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_small_ctr.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_SMALL_CTR_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_SMALL_CTR_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_small_ctrcbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_SMALL_CTRCBC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_SMALL_CTRCBC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_small_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_SMALL_DEC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_SMALL_DEC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_small_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_SMALL_ENC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_SMALL_ENC_C

#include "inner.h"

Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_x86ni.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_X86NI_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_X86NI_C

#define BR_ENABLE_INTRINSICS 1
#include "inner.h"
Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_x86ni_cbcdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_X86NI_CBCDEC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_X86NI_CBCDEC_C

#define BR_ENABLE_INTRINSICS 1
#include "inner.h"
Expand Down
3 changes: 2 additions & 1 deletion src/client/SSLClient/bssl/aes_x86ni_cbcenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*/

#include "../ESP_SSLClient_FS.h"
#if defined(USE_LIB_SSL_ENGINE)
#if !defined(EAS_X86NI_CBCENC_C) && defined(USE_LIB_SSL_ENGINE)
#define EAS_X86NI_CBCENC_C

#define BR_ENABLE_INTRINSICS 1
#include "inner.h"
Expand Down
Loading

0 comments on commit bda5e84

Please sign in to comment.