[PyWebMail-Checkins] webmail/webmail/utils/xhttp xCookie.py, 1.9, 1.10
Status: Beta
Brought to you by:
dubnerm
From: Michael D. <du...@us...> - 2008-03-07 20:34:47
|
Update of /cvsroot/pywebmail/webmail/webmail/utils/xhttp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20110 Modified Files: xCookie.py Log Message: - Index: xCookie.py =================================================================== RCS file: /cvsroot/pywebmail/webmail/webmail/utils/xhttp/xCookie.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** xCookie.py 4 Mar 2008 05:57:17 -0000 1.9 --- xCookie.py 7 Mar 2008 20:34:48 -0000 1.10 *************** *** 21,24 **** --- 21,25 ---- force_local = 0 #allow only cookies with domain set (see check_path) force_tail_match = 1 #always match domain names as if it was set with .domain + ignore_empty_port = 0 debug = 1 *************** *** 70,74 **** def check_not_expired(self, c): ! if c[1] is None: return 0 try: return rfc822.mktime_tz(c[1]) > time.time() + time.timezone --- 71,75 ---- def check_not_expired(self, c): ! if c[1] is None: return 1 try: return rfc822.mktime_tz(c[1]) > time.time() + time.timezone *************** *** 99,103 **** log.debug('check_path: %s filtered out due to path: "%s" doesn\'t starts with "%s"' % (c[0], path, c[2])) return 0 ! if not domain: return not self.force_local if self.force_tail_match or domain[0]=='.': if host[-len(domain):] == domain or '.'+host == domain: return 1 --- 100,108 ---- log.debug('check_path: %s filtered out due to path: "%s" doesn\'t starts with "%s"' % (c[0], path, c[2])) return 0 ! if not domain: ! if self.force_local: ! log.debug('check_path: %s filtered out due to domain: force_local is set (host="%s")' % (c[0], host)) ! return 0 ! return 1 if self.force_tail_match or domain[0]=='.': if host[-len(domain):] == domain or '.'+host == domain: return 1 *************** *** 105,108 **** --- 110,118 ---- return 0 if host==domain: return 1 + if (self.ignore_empty_port and + ':' not in domain and + ':' in host and + host.split(':')[0]==domain): + return 1 log.debug('check_path: %s filtered out due to domain: "%s" != "%s"' % (c[0], domain, host)) return 0 |