Hello community, here is the log from the commit of package imapfilter for openSUSE:Factory checked in at 2013-04-22 14:07:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/imapfilter (Old) and /work/SRC/openSUSE:Factory/.imapfilter.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "imapfilter", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/imapfilter/imapfilter.changes 2012-08-07 08:26:36.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.imapfilter.new/imapfilter.changes 2013-04-22 14:07:10.000000000 +0200 @@ -1,0 +2,8 @@ +Fri Apr 19 00:15:31 UTC 2013 - [email protected] + +- updated to IMAPFilter 2.5.4 - 9 Apr 2013 + - Some server responses are now parsed less stricly. + - More detailed information is now printed when there's an error. + - Bug fix; various corrections in the recovery mechanism. + +------------------------------------------------------------------- Old: ---- imapfilter-2.5.3.tar.gz New: ---- imapfilter-2.5.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ imapfilter.spec ++++++ --- /var/tmp/diff_new_pack.Vc8BPx/_old 2013-04-22 14:07:11.000000000 +0200 +++ /var/tmp/diff_new_pack.Vc8BPx/_new 2013-04-22 14:07:11.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package imapfilter # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,7 +21,7 @@ License: MIT Group: Productivity/Networking/Email/Utilities Url: https://github.com/lefcha/imapfilter -Version: 2.5.3 +Version: 2.5.4 Release: 0 Source: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ imapfilter-2.5.3.tar.gz -> imapfilter-2.5.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imapfilter-2.5.3/LICENSE new/imapfilter-2.5.4/LICENSE --- old/imapfilter-2.5.3/LICENSE 2012-07-22 15:29:45.000000000 +0200 +++ new/imapfilter-2.5.4/LICENSE 2013-04-09 21:45:51.000000000 +0200 @@ -1,4 +1,4 @@ -Copyright (c) 2001-2012 Eleftherios Chatzimparmpas +Copyright (c) 2001-2013 Eleftherios Chatzimparmpas Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imapfilter-2.5.3/NEWS new/imapfilter-2.5.4/NEWS --- old/imapfilter-2.5.3/NEWS 2012-07-22 15:29:45.000000000 +0200 +++ new/imapfilter-2.5.4/NEWS 2013-04-09 21:45:51.000000000 +0200 @@ -1,3 +1,8 @@ +IMAPFilter 2.5.4 - 9 Apr 2013 + - Some server responses are now parsed less stricly. + - More detailed information is now printed when there's an error. + - Bug fix; various corrections in the recovery mechanism. + IMAPFilter 2.5.3 - 22 Jul 2012 - New implementation for international mailbox names. - Bug fix; wrong variable name in one of the examples on extending. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imapfilter-2.5.3/src/Makefile new/imapfilter-2.5.4/src/Makefile --- old/imapfilter-2.5.3/src/Makefile 2012-07-22 15:29:45.000000000 +0200 +++ new/imapfilter-2.5.4/src/Makefile 2013-04-09 21:45:51.000000000 +0200 @@ -16,7 +16,7 @@ LIBSSL = -lssl LIBCRYPTO = -lcrypto -CFLAGS = -Wall -O -DCONFIG_SHAREDIR='"$(SHAREDIR)"' $(INCDIRS) $(MYCFLAGS) +CFLAGS = -Wall -Wextra -O -DCONFIG_SHAREDIR='"$(SHAREDIR)"' $(INCDIRS) $(MYCFLAGS) LDFLAGS = $(LIBDIRS) $(MYLDFLAGS) LIBS = -lm $(LIBLUA) $(LIBPCRE) $(LIBSSL) $(LIBCRYPTO) $(MYLIBS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imapfilter-2.5.3/src/common.lua new/imapfilter-2.5.4/src/common.lua --- old/imapfilter-2.5.3/src/common.lua 2012-07-22 15:29:45.000000000 +0200 +++ new/imapfilter-2.5.4/src/common.lua 2013-04-09 21:45:51.000000000 +0200 @@ -19,7 +19,7 @@ if type(arg) ~= 'nil' then if type(argtype) == 'string' then if type(arg) ~= argtype then - error(argtype .. ' argument expected, got ' .. type(arg), 3) + error(argtype .. ' argument expected, got ' .. type(arg), 4) end elseif type(argtype) == 'table' then local b = false @@ -27,7 +27,7 @@ if type(arg) == t then b = true end end if b == false then - error(argtype .. ' argument expected, got ' .. type(arg), 3) + error(argtype .. ' argument expected, got ' .. type(arg), 4) end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imapfilter-2.5.3/src/log.c new/imapfilter-2.5.4/src/log.c --- old/imapfilter-2.5.3/src/log.c 2012-07-22 15:29:45.000000000 +0200 +++ new/imapfilter-2.5.4/src/log.c 2013-04-09 21:45:51.000000000 +0200 @@ -51,7 +51,7 @@ { va_list args; - if (opts.debug <= 0 || !debugfp) + if (!opts.debug || !debugfp) return; va_start(args, fmt); @@ -68,7 +68,7 @@ debugc(char c) { - if (opts.debug <= 0 || !debugfp) + if (!opts.debug || !debugfp) return; fputc(c, debugfp); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imapfilter-2.5.3/src/lua.c new/imapfilter-2.5.4/src/lua.c --- old/imapfilter-2.5.3/src/lua.c 2012-07-22 15:29:45.000000000 +0200 +++ new/imapfilter-2.5.4/src/lua.c 2013-04-09 21:45:51.000000000 +0200 @@ -16,6 +16,7 @@ static lua_State *lua; /* Lua interpreter state. */ +static int traceback_handler(lua_State *lua); void init_options(void); void interactive_mode(void); @@ -77,8 +78,11 @@ "=<command line>") || lua_pcall(lua, 0, LUA_MULTRET, 0)) fatal(ERROR_CONFIG, "%s\n", lua_tostring(lua, -1)); } else { - if (luaL_loadfile(lua, opts.config) || - lua_pcall(lua, 0, LUA_MULTRET, 0)) + if (luaL_loadfile(lua, opts.config)) + fatal(ERROR_CONFIG, "%s\n", lua_tostring(lua, -1)); + lua_pushcfunction(lua, traceback_handler); + lua_insert(lua, 1); + if (lua_pcall(lua, 0, LUA_MULTRET, -2)) fatal(ERROR_CONFIG, "%s\n", lua_tostring(lua, -1)); } @@ -87,6 +91,26 @@ } +/* + * Add a stack traceback to the error message. + */ +static int +traceback_handler(lua_State *lua) +{ + +#if LUA_VERSION_NUM < 502 + lua_getfield(lua, LUA_GLOBALSINDEX, "debug"); + lua_getfield(lua, -1, "traceback"); + lua_pushvalue(lua, 1); + lua_pushinteger(lua, 2); + lua_call(lua, 2, 1); +#else + luaL_traceback(lua, lua, lua_tostring(lua, 1), 0); +#endif + return 1; +} + + /* * Stop the Lua interpreter. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imapfilter-2.5.3/src/namespace.c new/imapfilter-2.5.4/src/namespace.c --- old/imapfilter-2.5.3/src/namespace.c 2012-07-22 15:29:45.000000000 +0200 +++ new/imapfilter-2.5.4/src/namespace.c 2013-04-09 21:45:51.000000000 +0200 @@ -308,12 +308,12 @@ } /* Convert from Unicode to UTF-8. */ - if (ucp[0] >= 0x00 && ucp[0] <= 0x07) { + if (ucp[0] <= 0x07) { *out++ = 0xC0 | (ucp[0] << 2 & 0x1C) | (ucp[1] >> 6 & 0x03); *out++ = 0x80 | (ucp[1] & 0x3F); } else if ((ucp[0] >= 0x08 && ucp[0] <= 0xD7) || - (ucp[0] >= 0xE0 && ucp[0] <= 0xFF)) { + ucp[0] >= 0xE0) { *out++ = 0xE0 | (ucp[0] >> 4 & 0x0F); *out++ = 0x80 | (ucp[0] << 2 & 0x1C) | (ucp[1] >> 6 & 0x03); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imapfilter-2.5.3/src/request.c new/imapfilter-2.5.4/src/request.c --- old/imapfilter-2.5.3/src/request.c 2012-07-22 15:29:45.000000000 +0200 +++ new/imapfilter-2.5.4/src/request.c 2013-04-09 21:45:51.000000000 +0200 @@ -209,8 +209,8 @@ CHECK(t = send_request(ssn, "AUTHENTICATE CRAM-MD5")); CHECK(r = response_authenticate(ssn, t, &in)); if (r == STATUS_CONTINUE) { - if ((out = auth_cram_md5(user, pass, in)) == - NULL) + if ((out = auth_cram_md5(ssn->username, + ssn->password, in)) == NULL) goto abort; CHECK(send_continuation(ssn, (char *)(out), strlen((char *)(out)))); @@ -239,14 +239,16 @@ CHECK(t = send_request(ssn, "CAPABILITY")); CHECK(response_capability(ssn, t)); - if (!ssn->ns.delim && ssn->capabilities & CAPABILITY_NAMESPACE && + if (ssn->capabilities & CAPABILITY_NAMESPACE && get_option_boolean("namespace")) { CHECK(t = send_request(ssn, "NAMESPACE")); CHECK(response_namespace(ssn, t)); } if (ssn->selected) { - CHECK(t = send_request(ssn, "SELECT \"%s\"", ssn->selected)); + CHECK(t = send_request(ssn, "SELECT \"%s\"", + apply_namespace(ssn->selected, ssn->ns.prefix, + ssn->ns.delim))); CHECK(response_select(ssn, t)); } @@ -318,7 +320,7 @@ TRY(r = response_select(ssn, t)); if (r == STATUS_OK) - ssn->selected = mbox; + ssn->selected = xstrdup(mbox); return r; } @@ -335,8 +337,10 @@ TRY(t = send_request(ssn, "CLOSE")); TRY(r = response_generic(ssn, t)); - if (r == STATUS_OK && ssn->selected) + if (r == STATUS_OK && ssn->selected) { + xfree(ssn->selected); ssn->selected = NULL; + } return r; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imapfilter-2.5.3/src/response.c new/imapfilter-2.5.4/src/response.c --- old/imapfilter-2.5.3/src/response.c 2012-07-22 15:29:45.000000000 +0200 +++ new/imapfilter-2.5.4/src/response.c 2013-04-09 21:45:51.000000000 +0200 @@ -39,31 +39,31 @@ }; regexp responses[] = { /* Server data responses to be parsed; * regular expressions patterns. */ - { "([[:xdigit:]]{4,4}) (OK|NO|BAD) [^[:cntrl:]]*\r\n", NULL, 0, NULL }, - { "\\* CAPABILITY ([[:print:]]*)\r\n", NULL, 0, NULL }, - { "\\+ ([[:graph:]]*)\r\n", NULL, 0, NULL }, + { "([[:xdigit:]]{4,4}) (OK|NO|BAD) [^[:cntrl:]]*\r+\n+", NULL, 0, NULL }, + { "\\* CAPABILITY ([[:print:]]*)\r+\n+", NULL, 0, NULL }, + { "\\+ ([[:graph:]]*)\r+\n+", NULL, 0, NULL }, { "\\* NAMESPACE (NIL|\\(\\(\"([[:graph:]]*)\" \"([[:print:]])\"\\)" - "[[:print:]]*\\)) (NIL|\\([[:print:]]*\\)) (NIL|\\([[:print:]]*\\))" - "\r\n", NULL, 0, NULL }, - { "\\* STATUS [[:print:]]* \\(([[:alnum:] ]*)\\) *\r\n", NULL, 0, NULL }, + "[[:print:]]*\\)) (NIL|\\([[:print:]]*\\)) (NIL|\\([[:print:]]*\\)) *" + "\r+\n+", NULL, 0, NULL }, + { "\\* STATUS [[:print:]]* \\(([[:alnum:] ]*)\\) *\r+\n+", NULL, 0, NULL }, { "MESSAGES ([[:digit:]]+)", NULL, 0, NULL }, { "RECENT ([[:digit:]]+)", NULL, 0, NULL }, { "UNSEEN ([[:digit:]]+)", NULL, 0, NULL }, { "UIDNEXT ([[:digit:]]+)", NULL, 0, NULL }, - { "\\* ([[:digit:]]+) EXISTS\r\n", NULL, 0, NULL }, - { "\\* ([[:digit:]]+) RECENT\r\n", NULL, 0, NULL }, + { "\\* ([[:digit:]]+) EXISTS *\r+\n+", NULL, 0, NULL }, + { "\\* ([[:digit:]]+) RECENT *\r+\n+", NULL, 0, NULL }, { "\\* (LIST|LSUB) \\(([[:print:]]*)\\) (\"[[:print:]]\"|NIL) " - "(\"([[:print:]]+)\"|([[:print:]]+)|\\{([[:digit:]]+)\\}\r\n" - "([[:print:]]*))\r\n", NULL, 0, NULL }, - { "\\* SEARCH ?([[:digit:] ]*)\r\n", NULL, 0, NULL }, - { "\\* [[:digit:]]+ FETCH \\(([[:print:]]*)\\)\r\n", NULL, 0, NULL }, + "(\"([[:print:]]+)\"|([[:print:]]+)|\\{([[:digit:]]+)\\} *\r+\n+" + "([[:print:]]*))\r+\n+", NULL, 0, NULL }, + { "\\* SEARCH ?([[:digit:] ]*)\r+\n+", NULL, 0, NULL }, + { "\\* [[:digit:]]+ FETCH \\(([[:print:]]*)\\) *\r+\n+", NULL, 0, NULL }, { "FLAGS \\(([[:print:]]*)\\)", NULL, 0, NULL }, { "INTERNALDATE \"([[:print:]]*)\"", NULL, 0, NULL }, { "RFC822.SIZE ([[:digit:]]+)", NULL, 0, NULL }, { "BODYSTRUCTURE (\\([[:print:]]+\\))", NULL, 0, NULL }, { "\\* [[:digit:]]+ FETCH \\([[:print:]]*BODY\\[[[:print:]]*\\] " - "(\\{([[:digit:]]+)\\}\r\n|\"([[:print:]]*)\")", NULL, 0, NULL }, - { "\\* [[:digit:]]+ (RECENT|EXISTS)\r\n", NULL, 0, NULL }, + "(\\{([[:digit:]]+)\\} *\r+\n+|\"([[:print:]]*)\")", NULL, 0, NULL }, + { "\\* [[:digit:]]+ (RECENT|EXISTS) *\r+\n+", NULL, 0, NULL }, { NULL, NULL, 0, NULL } }; @@ -168,7 +168,7 @@ check_preauth(char *buf) { - if (xstrcasestr(ibuf.data, "* PREAUTH")) + if (xstrcasestr(buf, "* PREAUTH")) return 1; else return 0; @@ -381,6 +381,8 @@ if (r == -1 || r == STATUS_BYE) return r; + if (ssn->ns.prefix != NULL) + xfree(ssn->ns.prefix); ssn->ns.prefix = NULL; ssn->ns.delim = '\0'; @@ -576,13 +578,13 @@ re = &responses[RESPONSE_SEARCH]; b = ibuf.data; - m = NULL; while (!regexec(re->preg, b, re->nmatch, re->pmatch, 0)) { if (!*mesgs) { - m = *mesgs = (char *)xmalloc((ibuf.len + 1) * + *mesgs = (char *)xmalloc((ibuf.len + 1) * sizeof(char)); - *m = '\0'; } + m = *mesgs; + *m = '\0'; min = (unsigned int)(re->pmatch[1].rm_eo - re->pmatch[1].rm_so) < ibuf.len ? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imapfilter-2.5.3/src/session.c new/imapfilter-2.5.4/src/session.c --- old/imapfilter-2.5.3/src/session.c 2012-07-22 15:29:45.000000000 +0200 +++ new/imapfilter-2.5.4/src/session.c 2013-04-09 21:45:51.000000000 +0200 @@ -64,5 +64,7 @@ if (ssn->ns.prefix) xfree(ssn->ns.prefix); + if (ssn->selected) + xfree(ssn->selected); xfree(ssn); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imapfilter-2.5.3/src/session.h new/imapfilter-2.5.4/src/session.h --- old/imapfilter-2.5.3/src/session.h 2012-07-22 15:29:45.000000000 +0200 +++ new/imapfilter-2.5.4/src/session.h 2013-04-09 21:45:51.000000000 +0200 @@ -21,7 +21,7 @@ char *prefix; /* Namespace prefix. */ char delim; /* Namespace delimiter. */ } ns; - const char *selected; /* Selected mailbox. */ + char *selected; /* Selected mailbox. */ } session; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imapfilter-2.5.3/src/version.h new/imapfilter-2.5.4/src/version.h --- old/imapfilter-2.5.3/src/version.h 2012-07-22 15:29:45.000000000 +0200 +++ new/imapfilter-2.5.4/src/version.h 2013-04-09 21:45:51.000000000 +0200 @@ -3,10 +3,10 @@ /* Program's version number. */ -#define VERSION "2.5.3" +#define VERSION "2.5.4" /* Program's copyright. */ -#define COPYRIGHT "Copyright (c) 2001-2012 Eleftherios Chatzimparmpas" +#define COPYRIGHT "Copyright (c) 2001-2013 Eleftherios Chatzimparmpas" #endif /* VERSION_H */ -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
