[Pkg-citadel-commit] r117 - in webcit/trunk/debian: . patches

dothebart-guest at alioth.debian.org dothebart-guest at alioth.debian.org
Sat Aug 2 20:35:13 UTC 2008


Author: dothebart-guest
Date: 2008-08-02 20:35:11 +0000 (Sat, 02 Aug 2008)
New Revision: 117

Added:
   webcit/trunk/debian/patches/r6407_rate_passwords.diff
   webcit/trunk/debian/patches/r6414_perf_serv_printf.diff
   webcit/trunk/debian/patches/r6425_url_parser_fix.diff
   webcit/trunk/debian/patches/r6476_memleak_notes.diff
Modified:
   webcit/trunk/debian/changelog
   webcit/trunk/debian/patches/series
Log:
[r6407] add prepatch from devel branch that lets webcit rate userpasswords
      instad of layer 9
[r6414] add prepatch from devel branch tweaking serv_prinf
[r6425] add prepatch from devel branch fixing URL Parsing
[r6443] add prepatch from devel branch fixing IM Window bug, closes: #493449
[r6476] add prepatch from devel branch closing memleak



Modified: webcit/trunk/debian/changelog
===================================================================
--- webcit/trunk/debian/changelog	2008-08-02 18:35:13 UTC (rev 116)
+++ webcit/trunk/debian/changelog	2008-08-02 20:35:11 UTC (rev 117)
@@ -1,8 +1,14 @@
 webcit (7.37-dfsg-2) unstable; urgency=low
 
   [ Wilfried Goesgens ]
-  * add prepatch from devel branch fixing IM Window bug, closes: #493449
+  * [r6407] add prepatch from devel branch that lets webcit rate userpasswords
+    instad of layer 9
+  * [r6414] add prepatch from devel branch tweaking serv_prinf
+  * [r6425] add prepatch from devel branch fixing URL Parsing
+  * [r6443] add prepatch from devel branch fixing IM Window bug, closes: #493449
+  * [r6476] add prepatch from devel branch closing memleak
 
+
  -- Michael Meskes <meskes at debian.org>  Thu, 12 Jun 2008 09:50:53 +0200
 
 webcit (7.37-dfsg-1) unstable; urgency=low

Added: webcit/trunk/debian/patches/r6407_rate_passwords.diff
===================================================================
--- webcit/trunk/debian/patches/r6407_rate_passwords.diff	                        (rev 0)
+++ webcit/trunk/debian/patches/r6407_rate_passwords.diff	2008-08-02 20:35:11 UTC (rev 117)
@@ -0,0 +1,58 @@
+Index: auth.c
+===================================================================
+--- auth.c	(revision 6406)
++++ auth.c	(revision 6407)
+@@ -6,6 +6,7 @@
+ 
+ #include "webcit.h"
+ #include "webserver.h"
++#include <ctype.h>
+ 
+ /*
+  * Access level definitions.  This is initialized from a function rather than a
+@@ -671,8 +672,43 @@
+ 			if (a == 1)
+ 				wprintf("#%s<br /><H1>%s</H1>",
+ 					buf, &cmd[4]);
+-			if (a == 2)
+-				wprintf("PW: %s<br />\n", buf);
++			if (a == 2) {
++				char *pch;
++				int haveChar = 0;
++				int haveNum = 0;
++				int haveOther = 0;
++				int count = 0;
++				pch = buf;
++				while (!IsEmptyStr(pch))
++				{
++					if (isdigit(*pch))
++						haveNum = 1;
++					else if (isalpha(*pch))
++						haveChar = 1;
++					else
++						haveOther = 1;
++					pch ++;
++				}
++				count = pch - buf;
++				if (count > 7)
++					count = 0;
++				switch (count){
++				case 0:
++					pch = _("verry weak");
++					break;
++				case 1:
++					pch = _("weak");
++					break;
++				case 2:
++					pch = _("ok");
++					break;
++				case 3:
++				default:
++					pch = _("strong");
++				}
++
++				wprintf("PW: %s<br />\n", pch);
++			}
+ 			if (a == 3)
+ 				wprintf("%s<br />\n", buf);
+ 			if (a == 4)

Added: webcit/trunk/debian/patches/r6414_perf_serv_printf.diff
===================================================================
--- webcit/trunk/debian/patches/r6414_perf_serv_printf.diff	                        (rev 0)
+++ webcit/trunk/debian/patches/r6414_perf_serv_printf.diff	2008-08-02 20:35:11 UTC (rev 117)
@@ -0,0 +1,59 @@
+Index: tcp_sockets.c
+===================================================================
+--- tcp_sockets.c	(revision 6413)
++++ tcp_sockets.c	(revision 6414)
+@@ -123,21 +123,21 @@
+  * \param buf the buffer to get the input to
+  * \param bytes the maximal number of bytes to read
+  */
+-void serv_read(char *buf, int bytes)
++inline void _serv_read(char *buf, int bytes, struct wcsession *WCC)
+ {
+ 	int len, rlen;
+ 
+ 	len = 0;
+ 	while (len < bytes) {
+-		rlen = read(WC->serv_sock, &buf[len], bytes - len);
++		rlen = read(WCC->serv_sock, &buf[len], bytes - len);
+ 		if (rlen < 1) {
+ 			lprintf(1, "Server connection broken: %s\n",
+ 				strerror(errno));
+ 			wc_backtrace();
+-			close(WC->serv_sock);
+-			WC->serv_sock = (-1);
+-			WC->connected = 0;
+-			WC->logged_in = 0;
++			close(WCC->serv_sock);
++			WCC->serv_sock = (-1);
++			WCC->connected = 0;
++			WCC->logged_in = 0;
+ 			memset(buf, 0, bytes);
+ 			return;
+ 		}
+@@ -145,19 +145,25 @@
+ 	}
+ }
+ 
++void serv_read(char *buf, int bytes)
++{
++	struct wcsession *WCC = WC;
++	_serv_read(buf, bytes, WCC);
++}
+ 
+ /**
+  * \brief input string from pipe
+  */
+ int serv_getln(char *strbuf, int bufsize)
+ {
++	struct wcsession *WCC = WC;
+ 	int ch, len;
+ 	char buf[2];
+ 
+ 	len = 0;
+ 	strbuf[0] = 0;
+ 	do {
+-		serv_read(&buf[0], 1);
++		_serv_read(&buf[0], 1, WCC);
+ 		ch = buf[0];
+ 		if ((ch != 13) && (ch != 10)) {
+ 			strbuf[len++] = ch;

Added: webcit/trunk/debian/patches/r6425_url_parser_fix.diff
===================================================================
--- webcit/trunk/debian/patches/r6425_url_parser_fix.diff	                        (rev 0)
+++ webcit/trunk/debian/patches/r6425_url_parser_fix.diff	2008-08-02 20:35:11 UTC (rev 117)
@@ -0,0 +1,21 @@
+Index: webcit.c
+===================================================================
+--- webcit.c	(revision 6424)
++++ webcit.c	(revision 6425)
+@@ -109,7 +109,7 @@
+ 	buf[ulen] = '\0';
+ 	eptr = buf + ulen;
+ 	up = buf;
+-	while (!IsEmptyStr(up)) {
++	while ((up < eptr) && (!IsEmptyStr(up))) {
+ 		aptr = up;
+ 		while ((aptr < eptr) && (*aptr != '\0') && (*aptr != '='))
+ 			aptr++;
+@@ -143,6 +143,7 @@
+ 		lprintf(9, "%s = [%ld]  %s\n", u->url_key, u->url_data_size, u->url_data); 
+ #endif
+ 	}
++	free(buf);
+ }
+ 
+ /*

Added: webcit/trunk/debian/patches/r6476_memleak_notes.diff
===================================================================
--- webcit/trunk/debian/patches/r6476_memleak_notes.diff	                        (rev 0)
+++ webcit/trunk/debian/patches/r6476_memleak_notes.diff	2008-08-02 20:35:11 UTC (rev 117)
@@ -0,0 +1,22 @@
+Index: notes.c
+===================================================================
+--- notes.c	(revision 6475)
++++ notes.c	(revision 6476)
+@@ -227,13 +227,16 @@
+ void write_vnote_to_server(struct vnote *v) 
+ {
+ 	char buf[1024];
++	char *pch;
+ 
+ 	serv_puts("ENT0 1|||4");
+ 	serv_getln(buf, sizeof buf);
+ 	if (buf[0] == '4') {
+ 		serv_puts("Content-type: text/vnote");
+ 		serv_puts("");
+-		serv_puts(vnote_serialize(v));
++		pch = vnote_serialize(v);
++		serv_puts(pch);
++		free(pch);
+ 		serv_puts("000");
+ 	}
+ }

Modified: webcit/trunk/debian/patches/series
===================================================================
--- webcit/trunk/debian/patches/series	2008-08-02 18:35:13 UTC (rev 116)
+++ webcit/trunk/debian/patches/series	2008-08-02 20:35:11 UTC (rev 117)
@@ -1 +1,5 @@
+r6407_rate_passwords.diff
+r6414_perf_serv_printf.diff
+r6425_url_parser_fix.diff
 r6443_fix_im_window_weakness.diff
+r6476_memleak_notes.diff




More information about the Pkg-citadel-commit mailing list