Kaynağa Gözat

[Minor] When fold on chars skip other folding logic

Issue: #2111
tags/1.7.3
Vsevolod Stakhov 6 yıl önce
ebeveyn
işleme
f398b79492
1 değiştirilmiş dosya ile 7 ekleme ve 5 silme
  1. 7
    5
      src/libutil/str_util.c

+ 7
- 5
src/libutil/str_util.c Dosyayı Görüntüle

@@ -958,10 +958,12 @@ rspamd_header_value_fold (const gchar *name,
switch (state) {

case read_token:
if (fold_on_chars && strchr (fold_on_chars, *p) != NULL) {
fold_type = fold_after;
state = fold_token;
next_state = read_token;
if (fold_on_chars) {
if (strchr (fold_on_chars, *p) != NULL) {
fold_type = fold_after;
state = fold_token;
next_state = read_token;
}

p ++;
}
@@ -1153,7 +1155,7 @@ rspamd_header_value_fold (const gchar *name,
/* Last token */
switch (state) {
case read_token:
if (cur_len > fold_max && !first_token) {
if (!fold_on_chars && cur_len > fold_max && !first_token) {
if (g_ascii_isspace (*c)) {
c ++;
}

Loading…
İptal
Kaydet