Art Cancro [Tue, 23 Aug 2011 18:31:00 +0000 (14:31 -0400)]
Version number set to 7.87, tagging for stable release
Wilfried Goesgens [Sat, 20 Aug 2011 12:11:15 +0000 (12:11 +0000)]
Merge branch 'stable-78x' of ssh://git.citadel.org/appl/gitroot/citadel into stable-78x
Wilfried Goesgens [Fri, 19 Aug 2011 17:17:31 +0000 (17:17 +0000)]
add missing var definition *ups*
Wilfried Goesgens [Fri, 19 Aug 2011 17:12:32 +0000 (17:12 +0000)]
Fix detecting of UTF8 Sequences
- we need to exactly check for both highest bits to be set, not one of them.
Wilfried Goesgens [Fri, 19 Aug 2011 16:43:30 +0000 (16:43 +0000)]
fix counting of UTF8-charwidth
- Ctdl_GetUtf8SequenceLength(): testbyte needs to be unsigned char, else >> will shift us new bits in from the left
- we need to shift 'test' to the right
- start counting at 0
Wilfried Goesgens [Sat, 20 Aug 2011 11:58:14 +0000 (11:58 +0000)]
QP-Encode questionmarks.
Wilfried Goesgens [Sat, 20 Aug 2011 09:50:26 +0000 (09:50 +0000)]
When QP encoding, we need to convert blanks to underscores
- Spamassasin test 'BAD_ENC_HEADER' matches if a subject looks like that:
Subject: =?UTF-8?Q?=5Btestml=5D l=C3=B6sch misch ey.?=
it needs to look like that:
Subject: =?UTF-8?Q?=5Btestml=5D_l=C3=B6sch_misch_ey.?=
Wilfried Goesgens [Fri, 19 Aug 2011 17:17:31 +0000 (17:17 +0000)]
add missing var definition *ups*
Wilfried Goesgens [Fri, 19 Aug 2011 17:12:32 +0000 (17:12 +0000)]
Fix detecting of UTF8 Sequences
- we need to exactly check for both highest bits to be set, not one of them.
Wilfried Goesgens [Fri, 19 Aug 2011 16:43:30 +0000 (16:43 +0000)]
fix counting of UTF8-charwidth
- Ctdl_GetUtf8SequenceLength(): testbyte needs to be unsigned char, else >> will shift us new bits in from the left
- we need to shift 'test' to the right
- start counting at 0
Wilfried Goesgens [Thu, 18 Aug 2011 18:18:38 +0000 (18:18 +0000)]
fix StrHtmlEcmaEscAppend, StrECMAEscAppend
- StrHtmlEcmaEscAppend(): reimplement 'nbsp' - handling
- StrECMAEscAppend(): copy over required stuff from StrHtmlEcmaEscAppend()
Wilfried Goesgens [Thu, 18 Aug 2011 17:53:18 +0000 (17:53 +0000)]
Fix StrHtmlEcmaEscAppend() more edge cases in utf8 handling
- Ctdl_GetUtf8SequenceLength(): return 0 for broken, 1 for non-utf8 sequences
- StrHtmlEcmaEscAppend(): another attempt to fix json appending:
- use switch instead of Rumpelstilskin if sequence
- use HKEY for our static sequences
- don't check for buffer expansion again while utf8-handling; we have 11 bytes reserved, utf8 will at most become 6 bytes
- Simply handle ASCII chars in the utf8 loop
- since aptr is moved implicitely, we mustn't move it for the last byte
- add missing handling for some escapers
- let unicode escapers pass
Wilfried Goesgens [Thu, 18 Aug 2011 10:30:35 +0000 (10:30 +0000)]
Don't add brackets <> to the reply to; it should be ok without.
Wilfried Goesgens [Thu, 18 Aug 2011 10:27:54 +0000 (10:27 +0000)]
parse reply-to header into its permanent database field
it seems as if some mailers (Open exchange for example) add Reply-To headers; if we don't parse it when receiving it,
our list service adds another header; thus parse it into the database of headers.
Wilfried Goesgens [Thu, 18 Aug 2011 09:53:01 +0000 (09:53 +0000)]
fix QP encoding
- once we decided to QP encode we also need to encode = (forgotten in last commit)
Wilfried Goesgens [Thu, 18 Aug 2011 09:14:48 +0000 (09:14 +0000)]
fix QP encoding
- once we decided to QP encode we also need to encode =[]
Wilfried Goesgens [Wed, 17 Aug 2011 10:12:21 +0000 (10:12 +0000)]
Fix envelope-to header.
- don't output leading whitespace
- don't output it at all if there is just whitespace inside.
Wilfried Goesgens [Fri, 12 Aug 2011 15:51:14 +0000 (15:51 +0000)]
network_spool_msg() handle QP
while appending the [roomname] to the mailsubject, we have to
- de-qp the original subject
- search for the roomname
- possibly prepend '[roomame] '
- and re-qp everything.
that way we solve...
- multiple [roomname] additions in case of QP encoded subjects
- non RFC-Conformant behaviour in case of roomnames with umlauts.
Art Cancro [Tue, 5 Jul 2011 15:57:18 +0000 (11:57 -0400)]
Revert "Ugly hack to fix wiki history broken by the 'message xxx is not in this room' security check"
This reverts commit
b63ef8c45ce751cb78dc4a9061a31b5448ec9049.
Art Cancro [Fri, 1 Jul 2011 05:13:12 +0000 (01:13 -0400)]
Ugly hack to fix wiki history broken by the 'message xxx is not in this room' security check
Wilfried Goesgens [Wed, 29 Jun 2011 22:48:54 +0000 (22:48 +0000)]
Merge branch 'stable-78x' of ssh://git.citadel.org/appl/gitroot/citadel into stable-78x
Wilfried Goesgens [Wed, 29 Jun 2011 22:46:59 +0000 (22:46 +0000)]
fix the GETMETADATA command; we mustn't count our naive split of the comand, it will fail if we have blanks in roomnames.
this fixes troubles seen with citadel <-> bynari connector.
Wilfried Goesgens [Wed, 29 Jun 2011 09:56:50 +0000 (11:56 +0200)]
Fix K-Escaper; we wouldn't copy the whole UTF-8 sequence in some cases.
Art Cancro [Wed, 15 Jun 2011 04:26:25 +0000 (00:26 -0400)]
xmpp_destroy_buddy() now accepts an 'aggressively' flag that indicates whether the server should push an 'unsubscribed' presence tag. Apparently we can only do this when sending a roster flush at the beginning of the session, because sending it when another user logs out in the middle of our session confuses Jitsi into thinking that the other user rejected a subscription request. I think it's making Pidgin behave better too, but more testing is needed.
Wilfried Goesgens [Tue, 24 May 2011 22:03:16 +0000 (22:03 +0000)]
Merge branch 'stable-78x' of ssh://git.citadel.org/appl/gitroot/citadel into stable-78x
Wilfried Goesgens [Tue, 24 May 2011 22:02:03 +0000 (22:02 +0000)]
fix various incidents reported by CLANG Static analyzer:
- unneeded Vars
- possible uninitialized access
Wilfried Goesgens [Tue, 24 May 2011 22:01:07 +0000 (22:01 +0000)]
use defines for size_t formating token
Wilfried Goesgens [Tue, 24 May 2011 21:57:23 +0000 (21:57 +0000)]
fix possible NULL-Pointer access, thanks to CLANG static analyzers for pointing out..
Wilfried Goesgens [Tue, 24 May 2011 21:55:08 +0000 (21:55 +0000)]
fix possible NULL pointer access, thanks to the CLANG static analyser.
Wilfried Goesgens [Tue, 24 May 2011 21:53:16 +0000 (21:53 +0000)]
Static analyzer fixes;
- fix uninitialized access in case of us sending 404
- remove unneeded duplicate line.
Wilfried Goesgens [Tue, 24 May 2011 21:51:35 +0000 (21:51 +0000)]
fix possible uninitialized access; thanks to the Clang Static analyzer for pointing out.
Wilfried Goesgens [Tue, 24 May 2011 21:48:49 +0000 (21:48 +0000)]
fix the evaluation of password quality; thanks to the clang static analyzer for pointing me there.
Art Cancro [Mon, 23 May 2011 19:47:07 +0000 (15:47 -0400)]
ServerShutdownModule_GETTEXT() was failing on non-locale-aware systems, fixed
Art Cancro [Mon, 23 May 2011 19:38:00 +0000 (15:38 -0400)]
ServerShutdownModule_GETTEXT() was failing on non-locale-aware systems, fixed
Art Cancro [Mon, 23 May 2011 19:34:11 +0000 (15:34 -0400)]
ServerShutdownModule_GETTEXT() was failing on non-locale-aware systems, fixed
Art Cancro [Mon, 23 May 2011 17:47:28 +0000 (13:47 -0400)]
Backport
Art Cancro [Mon, 23 May 2011 17:35:52 +0000 (13:35 -0400)]
sock_connect() - if first char of hostname is '/' assume it is a unix domain socket and connect to that instead
Wilfried Goesgens [Thu, 19 May 2011 21:19:25 +0000 (21:19 +0000)]
Fix unfolding of RFC822 lines so we don't loose blanks.
Wilfried Goesgens [Sat, 14 May 2011 14:01:36 +0000 (14:01 +0000)]
fix message composing
- when composing the text/plain downmix mimepart we forgot to add a linefeed.
Wilfried Goesgens [Thu, 12 May 2011 20:18:03 +0000 (20:18 +0000)]
fix source so that '-Wformat -Werror=format-security' doesn't stop us from compiling
Wilfried Goesgens [Tue, 10 May 2011 22:05:46 +0000 (22:05 +0000)]
just log the close if we're realy going to close.
Wilfried Goesgens [Tue, 10 May 2011 22:03:20 +0000 (22:03 +0000)]
Don't close 0-filedescriptors on session killing, its our indicator for not here, since 0 equals STDIN which at best is redirected to /dev/null
Wilfried Goesgens [Thu, 5 May 2011 21:36:06 +0000 (21:36 +0000)]
* add test data from head, so we can compare results
Wilfried Goesgens [Thu, 5 May 2011 21:14:25 +0000 (21:14 +0000)]
fix possible crashes of not NULL-checking the result of icalproperty_get_attendee()
Wilfried Goesgens [Thu, 5 May 2011 21:14:01 +0000 (21:14 +0000)]
add test for html translating
Wilfried Goesgens [Tue, 3 May 2011 19:49:23 +0000 (19:49 +0000)]
Fix possible endless loop conditions
Art Cancro [Tue, 3 May 2011 17:06:41 +0000 (13:06 -0400)]
Guard against 'billion laughs' attack in our XMPP service
Wilfried Goesgens [Sun, 17 Apr 2011 21:41:12 +0000 (21:41 +0000)]
add new version
Wilfried Goesgens [Sun, 17 Apr 2011 21:21:41 +0000 (21:21 +0000)]
Fix of terminate problem while loading user list
Art Cancro [Mon, 11 Apr 2011 14:03:53 +0000 (10:03 -0400)]
Tag stable-78x for 7.86 release
Wilfried Goesgens [Thu, 7 Apr 2011 21:53:21 +0000 (23:53 +0200)]
Problem with merge: this is called Buf in stable, not LineBuf
Wilfried Goesgens [Thu, 7 Apr 2011 21:41:53 +0000 (23:41 +0200)]
if StrBuf_ServGetln() is called in a loop, its return value has to be checked for error, else we might get into infinite loops.
Wilfried Goesgens [Sun, 3 Apr 2011 21:47:46 +0000 (23:47 +0200)]
when generating subjects for calendar items do quoted printeable encoding
Wilfried Goesgens [Thu, 31 Mar 2011 22:50:43 +0000 (00:50 +0200)]
Fix searching of ']'
Wilfried Goesgens [Thu, 31 Mar 2011 21:11:14 +0000 (23:11 +0200)]
Mailinglist client: don't add roomname to subject if its already there
Art Cancro [Tue, 5 Apr 2011 18:32:13 +0000 (14:32 -0400)]
Reset run_queue_now back to 0 after a forced run of the SMTP queue.
Otherwise we continue to retry every message every minute, and that is bad.
Art Cancro [Wed, 23 Feb 2011 16:41:12 +0000 (11:41 -0500)]
Fixed incorrect byte count when writing XML entity references
(cherry picked from commit
77fc8e79ee0edb8b4b67fc4dcb3ed1b32381cb52)
Art Cancro [Tue, 22 Feb 2011 23:35:33 +0000 (18:35 -0500)]
Backported XML export fixes from master
Art Cancro [Tue, 22 Feb 2011 22:43:11 +0000 (17:43 -0500)]
Sanitize v_seen and v_answered during export
(cherry picked from commit
eeda2be5a606771a06a74cca7705f4a7ec12c7fa)
Art Cancro [Tue, 22 Feb 2011 21:06:36 +0000 (16:06 -0500)]
Escape single and double quotes in export format
(cherry picked from commit
cbd9bcf9a70f48fbb6d85b0a8eab837ebe1838ce)
Art Cancro [Tue, 22 Feb 2011 23:33:15 +0000 (18:33 -0500)]
Art Cancro [Fri, 18 Feb 2011 16:20:52 +0000 (11:20 -0500)]
Enable XMPP over TLS
Wilfried Goesgens [Sat, 12 Feb 2011 13:43:21 +0000 (14:43 +0100)]
free the context on that exit place too.
Wilfried Goesgens [Sat, 12 Feb 2011 13:15:29 +0000 (14:15 +0100)]
Memleak: free the context on abort too.
Wilfried Goesgens [Sun, 6 Feb 2011 19:31:01 +0000 (20:31 +0100)]
Wilfried Goesgens [Sun, 30 Jan 2011 10:00:47 +0000 (11:00 +0100)]
By jimcuclamath: set maxium allowed password length to the length of the buffer we read into.
Wilfried Goesgens [Sat, 15 Jan 2011 17:47:03 +0000 (18:47 +0100)]
use the gnu format string checker for CtdlLogPrintf; fix associated new warnings / problems.
Wilfried Goesgens [Sat, 15 Jan 2011 13:05:54 +0000 (14:05 +0100)]
apply memset-0 fix here too.
Wilfried Goesgens [Sat, 15 Jan 2011 13:05:21 +0000 (14:05 +0100)]
SMTP-Bouncing: don't put message body on wrong Citadel-Message-field.
Art Cancro [Tue, 11 Jan 2011 03:59:15 +0000 (22:59 -0500)]
Wiki revs now work again - replaced --global-reject-file with -r
Wilfried Goesgens [Sat, 8 Jan 2011 09:06:13 +0000 (10:06 +0100)]
THIS IS 7.85
Art Cancro [Mon, 3 Jan 2011 16:52:25 +0000 (11:52 -0500)]
Fix hangups on binary blob reads from webcit stable
Wilfried Goesgens [Tue, 21 Dec 2010 17:06:07 +0000 (18:06 +0100)]
Fix bug in SMTP-Client to send two < in the envelope sender, which will probably result in bounces/rejects.
Art Cancro [Tue, 21 Dec 2010 03:23:49 +0000 (22:23 -0500)]
update version number in preparation for 7.85 release
Art Cancro [Mon, 20 Dec 2010 04:22:05 +0000 (23:22 -0500)]
Replaced client_read() with socket_read_blob() in serv_network.c
Art Cancro [Fri, 17 Dec 2010 19:21:03 +0000 (14:21 -0500)]
Wilfried Goesgens [Mon, 13 Dec 2010 17:23:31 +0000 (18:23 +0100)]
SMTP Async I/O:
- while sending data, wait relative to the size of the mail /128 + a minimal set of 50.
Wilfried Goesgens [Tue, 14 Dec 2010 00:48:14 +0000 (01:48 +0100)]
MimeParser Rewrite: add test to revalidate the results of the rewrite to the stable mimeparser.
Wilfried Goesgens [Sun, 21 Nov 2010 15:34:16 +0000 (16:34 +0100)]
Relax SMTP Client timeout settings as discussed.
- default is 30 seconds
- Server greeting 90 seconds (DNS lookups for RBLs might be slow
- Server sending the response to the EOM sequence; here we might have background processing like virus or spam scanning that wants to finish before finaly accepting the message.
Wilfried Goesgens [Sat, 6 Nov 2010 11:18:23 +0000 (12:18 +0100)]
Nonblocking sockets need to select while writing
we changed the SMTP outbound connections to be nonblocking so we could abort on not reacting SMTP-Servers.
thus we need to select before writing, else the connection will fail.
Wilfried Goesgens [Sat, 6 Nov 2010 12:51:41 +0000 (13:51 +0100)]
have flexible timouts while reading lines in our client mode connections
since some mailserver take a little longer to finish reading mails we need to wait after we send our '.\r\n'; its 90 seconds now, all other parts will wait 5s, quit will wait 1 second.
Wilfried Goesgens [Tue, 9 Nov 2010 00:29:50 +0000 (01:29 +0100)]
check whether the sorting algorithm specified via BSTRs is intended for us before using its groupchange detector.
Wilfried Goesgens [Sun, 14 Nov 2010 22:10:57 +0000 (23:10 +0100)]
Memleak: free the roomlist of the sieve-queued rooms on exit; other tiny leaks.
Wilfried Goesgens [Mon, 15 Nov 2010 11:41:55 +0000 (12:41 +0100)]
smtp_do_bounce(): don't loose msg['A'] when overwriting its content.
Wilfried Goesgens [Mon, 15 Nov 2010 11:46:17 +0000 (12:46 +0100)]
Memleak: CtdlMakeMessage(): don't forget about the original author.
Wilfried Goesgens [Mon, 15 Nov 2010 13:43:50 +0000 (14:43 +0100)]
Memleak: post_message(): don't forget about the recipient buffer.
Wilfried Goesgens [Tue, 16 Nov 2010 21:36:38 +0000 (22:36 +0100)]
Don't send identity header if we want to do gzip compression
Propfind replies send 'Content-encoding: identity' right now, which is superseeded by the frameworks 'Content-encoding: gzip' in case of the client indicates this.
sending that headers twice has uncertain results depending on the client; while the RFC demands to evaluate the later, some fail to read our reply then.
Wilfried Goesgens [Wed, 10 Nov 2010 19:22:16 +0000 (20:22 +0100)]
fix buffer overrun while converting charsets
* DecodeSegment() didn't check whether one of the temporary buffers would be able to bear the transcoding results
Wilfried Goesgens [Thu, 4 Nov 2010 19:28:27 +0000 (20:28 +0100)]
fix crash in SSL BLOB-Reading
- when diciding whether the read buffer contains more than the blob reader wants we had a wrong equation.
Wilfried Goesgens [Thu, 4 Nov 2010 23:12:50 +0000 (00:12 +0100)]
if we tell the client we're in error state, return.
if SNET would fail to open the temporary file, it would tell the client 'error' and continue to read -> hang
we now abort after reporting the error.
Wilfried Goesgens [Mon, 1 Nov 2010 09:24:51 +0000 (10:24 +0100)]
Finalize fixing of netconfig loosing incident
* need to set & check errno that tells us whether our tempfile was fresh created or already there
* remove tmpfile on error
* don't use fopen() because we can't specify the flags we need for that
* ftruncate() the tempfile at the right place
Wilfried Goesgens [Sat, 30 Oct 2010 17:54:01 +0000 (19:54 +0200)]
Prevent writing empty network configs Part II
* writenfree_spoolcontrol_file ()
- serialise into a StrBuf
- write that to a tempfile in the netconfig directory
- if we fail, abort & log error
- if we succed use rename () to replace the original config file.
Wilfried Goesgens [Sat, 30 Oct 2010 16:44:15 +0000 (18:44 +0200)]
* cmd_snet: make shure the target FS has enough space for the new config
- Create our own filename insteaf of using mk*tmp*; CC->cs_pid should be uniq.; we use O_CREAT|O_EXCL so we're shure its ours or fails.
- Create that filename in the same directory as the filal config filename; by that we can be shure its in the same filesystem, and if thats full, we will fail
- Stat the original file for sise (if not there assume 80) and write twice as much into that file so we're next to shure the content from the client will fit in
- the citadel protocol is a little st00pit here, we don't know the size in advance, and we can't return an error _after_ accepting the file
- instead of moving the content of the tempfile into the final file, we use rename() which is supposed to be atomic.
Wilfried Goesgens [Sat, 30 Oct 2010 16:43:20 +0000 (18:43 +0200)]
assoc_file_name(): return length of string
Wilfried Goesgens [Tue, 26 Oct 2010 19:34:32 +0000 (21:34 +0200)]
* sock_getln (): CtdlSockGetLine() gives us lines without \r\n, no need to look for them again
* sock_getln_err (): add integer pointer returning the actual return state in case of error
* ml_sock_gets (): use sock_getln_err () so we can abort on impropper replies
* smtp_try (): make socket nonblocking, so we can abort on error
-> we will wait 5 seconds for the remote site to send us the SMTP-State else we will abort the connection on failure.
Wilfried Goesgens [Mon, 4 Oct 2010 22:41:35 +0000 (00:41 +0200)]
* check whether we need to QP-Encode our from in case of umlauts or so in the users realname.
Wilfried Goesgens [Mon, 4 Oct 2010 22:14:33 +0000 (00:14 +0200)]
* StrBufSanitizeEmailRecipientVector () fix another off by one
Wilfried Goesgens [Thu, 23 Sep 2010 16:20:16 +0000 (18:20 +0200)]
* the number of messages available are unequal to those in scope of the list.
Wilfried Goesgens [Thu, 23 Sep 2010 16:19:28 +0000 (18:19 +0200)]
* off by one in range checking of indexed access
Art Cancro [Mon, 20 Sep 2010 20:25:43 +0000 (16:25 -0400)]
Backport infanticide prevention patch from head