mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 17:30:12 +01:00
early decoding of utf/qp/... encoded attachment filenames
This commit is contained in:
parent
13534576df
commit
eeeb3fbad8
@ -13,7 +13,7 @@
|
||||
|
||||
#define VERSION "0.1.23-master-branch"
|
||||
|
||||
#define BUILD 739
|
||||
#define BUILD 741
|
||||
|
||||
#define HOSTID "mailarchiver"
|
||||
|
||||
|
@ -128,7 +128,6 @@ void post_parse(struct session_data *sdata, struct _state *state, struct __confi
|
||||
|
||||
for(i=1; i<=state->n_attachments; i++){
|
||||
digest_file(state->attachments[i].internalname, &(state->attachments[i].digest[0]));
|
||||
fixupEncodedHeaderLine(state->attachments[i].filename);
|
||||
|
||||
if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: attachment list: i:%d, name=*%s*, type: *%s*, size: %d, int.name: %s, digest: %s", sdata->ttmpfile, i, state->attachments[i].filename, state->attachments[i].type, state->attachments[i].size, state->attachments[i].internalname, state->attachments[i].digest);
|
||||
|
||||
@ -272,6 +271,8 @@ int parse_line(char *buf, struct _state *state, struct session_data *sdata, int
|
||||
if(take_into_pieces == 1){
|
||||
state->fd = open(state->attachments[state->n_attachments].internalname, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR);
|
||||
|
||||
fixupEncodedHeaderLine(state->attachments[state->n_attachments].filename);
|
||||
|
||||
p = get_attachment_extractor_by_filename(state->attachments[state->n_attachments].filename);
|
||||
|
||||
snprintf(state->attachments[state->n_attachments].shorttype, TINYBUFSIZE-1, "%s", p);
|
||||
|
Loading…
Reference in New Issue
Block a user