<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RES: [mod_python] The right way to handle sessions</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Hi Amir.</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>You can add your code snippet in the mod_python wiki cookbook (<A HREF="http://modpython.coedit.net/CookBook" TARGET="_blank">http://modpython.coedit.net/CookBook</A>). </FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>Regards,</FONT>
</P>

<P><FONT SIZE=2>Alexandre Denstone</FONT>
<BR><FONT SIZE=2>BankBoston - Retail Internet Systems</FONT>
<BR><FONT SIZE=2>* ajdenstone@bkb.com.br</FONT>
</P>
<BR>

<P><FONT SIZE=2>-----Mensagem original-----</FONT>
<BR><FONT SIZE=2>De: Amir Salihefendic [<A HREF="mailto:amix@amix.dk">mailto:amix@amix.dk</A>] </FONT>
<BR><FONT SIZE=2>Enviada em: sexta-feira, 13 de agosto de 2004 12:32</FONT>
<BR><FONT SIZE=2>Para: mod_python user mailing list</FONT>
<BR><FONT SIZE=2>Assunto: Re: [mod_python] The right way to handle sessions</FONT>
</P>
<BR>

<P><FONT SIZE=2>&gt; def createSession(req):</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; new_session = Session.Session(req)</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; new_session.unlock()</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; #Check id</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; req.write(new_session.id())</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; return getSameSession(req, new_session.id())</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; def getSameSession(req, SID):</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; same_session = Session.Session(req, SID)</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; #Check id</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; req.write(&quot;\n%s\n&quot; % same_session.id())</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; return &quot;Done&quot;</FONT>
</P>

<P><FONT SIZE=2>Argh forgot something very important (to save the damn session)!: def createSession(req):</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; new_session = Session.Session(req)</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; new_session.save()</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; new_session.unlock()</FONT>
</P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; #Check id</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; req.write(new_session.id())</FONT>
</P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; return getSameSession(req, new_session.id())</FONT>
</P>

<P><FONT SIZE=2>def getSameSession(req, SID):</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; same_session = Session.Session(req, SID)</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; same_session.load()</FONT>
</P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; #Check id</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; req.write(&quot;\n%s\n&quot; % same_session.id())</FONT>
</P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; return &quot;Done&quot;</FONT>
</P>

<P><FONT SIZE=2>*Tsk tsk*</FONT>
</P>

<P><FONT SIZE=2>Med venlig hilsen / Kind regards</FONT>
<BR><FONT SIZE=2>Amir Salihefendic</FONT>
<BR><FONT SIZE=2>-----</FONT>
<BR><FONT SIZE=2>What we do in life echoes in eternity</FONT>
<BR><FONT SIZE=2>Den 13/8-2004, kl. 13.30, skrev Amir Salihefendic:</FONT>
</P>

<P><FONT SIZE=2>&gt; Thanks a lot for your time spent on the reply, I appreciate it.</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; &quot;Under what circumstances do you call createSession() instead of</FONT>
<BR><FONT SIZE=2>&gt; getSameSession()?&quot;</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; Let's take another example:</FONT>
<BR><FONT SIZE=2>&gt; I am making a blog-system where I need to have an admin section. I am</FONT>
<BR><FONT SIZE=2>&gt; using the publisher handler.</FONT>
<BR><FONT SIZE=2>&gt; Simple forms post username and password to admin.py</FONT>
<BR><FONT SIZE=2>&gt; Admin.py has an index function, which has username and password as </FONT>
<BR><FONT SIZE=2>&gt; input.</FONT>
<BR><FONT SIZE=2>&gt; In the index function I check if the username and password match, if </FONT>
<BR><FONT SIZE=2>&gt; they do I create an session and store username and password.</FONT>
<BR><FONT SIZE=2>&gt; Now, I need to redirect to a new function viewPosts (it's also located </FONT>
<BR><FONT SIZE=2>&gt; in the admin module).</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; In viewPosts I have to check if the right session is set - else</FONT>
<BR><FONT SIZE=2>&gt; somebody could do admin.py/viewPosts and get access to the admin </FONT>
<BR><FONT SIZE=2>&gt; section.</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; Of course, I could solve problem in many other ways:</FONT>
<BR><FONT SIZE=2>&gt; - Send the SID to viewPosts</FONT>
<BR><FONT SIZE=2>&gt; - Place everything in one function (i.e. place everything in</FONT>
<BR><FONT SIZE=2>&gt; admin.py/index)</FONT>
<BR><FONT SIZE=2>&gt; - &quot;Append&quot; the session to the req object</FONT>
<BR><FONT SIZE=2>&gt; - Make viewPosts private (i.e. do _viewPosts) and then I can only </FONT>
<BR><FONT SIZE=2>&gt; access it by going through admin.py/index</FONT>
<BR><FONT SIZE=2>&gt; -etc.</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; Anyway, I am interested in knowing: What is the smartest way to</FONT>
<BR><FONT SIZE=2>&gt; &quot;share&quot;/access same session across functions (i.e. when you are </FONT>
<BR><FONT SIZE=2>&gt; internal &quot;redirecting&quot;)? Example of what I mean by &quot;redirecting&quot; (not </FONT>
<BR><FONT SIZE=2>&gt; working...):</FONT>
<BR><FONT SIZE=2>&gt; def createSession(req):</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; new_session = Session.Session(req)</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; return getSameSession(req)</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; def getSameSession(req):</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; same_session = Session.Session(req)</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; return same_session.id()</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; My guess is to send the SID (working). This seems to be a very light</FONT>
<BR><FONT SIZE=2>&gt; and easy approach:</FONT>
<BR><FONT SIZE=2>&gt; def createSession(req):</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; new_session = Session.Session(req)</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; new_session.unlock()</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; #Check id</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; req.write(new_session.id())</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; return getSameSession(req, new_session.id())</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; def getSameSession(req, SID):</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; same_session = Session.Session(req, SID)</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; #Check id</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; req.write(&quot;\n%s\n&quot; % same_session.id())</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; return &quot;Done&quot;</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; (This is a solution I use now.) Of course this is very simplified</FONT>
<BR><FONT SIZE=2>&gt; example...</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; Med venlig hilsen / Kind regards</FONT>
<BR><FONT SIZE=2>&gt; Amir Salihefendic</FONT>
<BR><FONT SIZE=2>&gt; -----</FONT>
<BR><FONT SIZE=2>&gt; What we do in life echoes in eternity</FONT>
<BR><FONT SIZE=2>&gt; Den 13/8-2004, kl. 1.17, skrev Byron Ellacott:</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; Amir Salihefendic wrote:</FONT>
<BR><FONT SIZE=2>&gt;&gt;&gt; I welcome myself to this list ;-)</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; Welcome!</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; [working example]</FONT>
<BR><FONT SIZE=2>&gt;&gt;&gt; def createSession(req):</FONT>
<BR><FONT SIZE=2>&gt;&gt;&gt; def getSameSession(req):</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; The important thing to note here is that the code is identical in</FONT>
<BR><FONT SIZE=2>&gt;&gt; both calls.&nbsp; That is, if you call Session.Session(req) with no </FONT>
<BR><FONT SIZE=2>&gt;&gt; session ID in cookies, or the existing session ID has no matching </FONT>
<BR><FONT SIZE=2>&gt;&gt; session stored on disk, a new session ID is generated.</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; But, the session is /not/ written to disk.</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt;&gt; def createSession(req):</FONT>
<BR><FONT SIZE=2>&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; return getSameSession(req)</FONT>
<BR><FONT SIZE=2>&gt;&gt;&gt; def getSameSession(req):</FONT>
<BR><FONT SIZE=2>&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; return same_session.id()</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; So when you change to calling getSameSession() from createSession()</FONT>
<BR><FONT SIZE=2>&gt;&gt; you are in fact creating /two/ sessions.&nbsp; My guess would be that your </FONT>
<BR><FONT SIZE=2>&gt;&gt; apparent infinite loop is in fact a deadlock, caused by the fact that </FONT>
<BR><FONT SIZE=2>&gt;&gt; your second created session will be reusing the session ID created by </FONT>
<BR><FONT SIZE=2>&gt;&gt; the first one, and then attempting to establish a global lock on that </FONT>
<BR><FONT SIZE=2>&gt;&gt; session ID.&nbsp; Bad.</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt;&gt; This does not work - it makes an infinitive loop..!&nbsp; Now to fix this</FONT>
<BR><FONT SIZE=2>&gt;&gt;&gt; you need to unlock the session in createSession (.. I have no clue </FONT>
<BR><FONT SIZE=2>&gt;&gt;&gt; why you have to do this..?). And then you need to restart apache...&nbsp; </FONT>
<BR><FONT SIZE=2>&gt;&gt;&gt; i.e.:</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; This bears up my analysis well.&nbsp; The locking done by the Session</FONT>
<BR><FONT SIZE=2>&gt;&gt; module is an Apache-wide lock on the session ID.&nbsp; So, when </FONT>
<BR><FONT SIZE=2>&gt;&gt; createSession() first creates a session, it locks that sid.&nbsp; Then, it </FONT>
<BR><FONT SIZE=2>&gt;&gt; calls getSameSession() which attempts to lock the same sid.&nbsp; The lock </FONT>
<BR><FONT SIZE=2>&gt;&gt; call blocks here, waiting for the first lock to be released, but that </FONT>
<BR><FONT SIZE=2>&gt;&gt; release will never come.&nbsp; If you cause the first created session to </FONT>
<BR><FONT SIZE=2>&gt;&gt; unlock itself, you will not create a deadlock, but you will need to </FONT>
<BR><FONT SIZE=2>&gt;&gt; restart apache to break an existing deadlock.</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt;&gt; But this does not work quite well.. If you delete the Session: And </FONT>
<BR><FONT SIZE=2>&gt;&gt;&gt; then you do this: First time the id's aren't same - after that they </FONT>
<BR><FONT SIZE=2>&gt;&gt;&gt; are the same.</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; When a session has been deleted, it is marked as invalid and calling</FONT>
<BR><FONT SIZE=2>&gt;&gt; .load() on that sid will fail.&nbsp; .__init__() will create a new sid if </FONT>
<BR><FONT SIZE=2>&gt;&gt; .load() fails for an existing one, so I suspect you are seeing this </FONT>
<BR><FONT SIZE=2>&gt;&gt; behaviour.</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; Overall, it seems you are making the session management process far</FONT>
<BR><FONT SIZE=2>&gt;&gt; more complicated than it needs to be.&nbsp; Under what circumstances do </FONT>
<BR><FONT SIZE=2>&gt;&gt; you call createSession() instead of getSameSession() ?</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; I am successfully using the Session module to handle an HTML forms</FONT>
<BR><FONT SIZE=2>&gt;&gt; based login system:</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; session = Session.Session(req)</FONT>
<BR><FONT SIZE=2>&gt;&gt; if NeedAuth and not session.has_key('username'):</FONT>
<BR><FONT SIZE=2>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; redirect(AuthPage)</FONT>
<BR><FONT SIZE=2>&gt;&gt; ServePage(req)</FONT>
<BR><FONT SIZE=2>&gt;&gt; session.save()</FONT>
<BR><FONT SIZE=2>&gt;&gt; return apache.OK</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; This is a simplification, since I use an extensible application</FONT>
<BR><FONT SIZE=2>&gt;&gt; object that allows you to change how sessions are generated and how </FONT>
<BR><FONT SIZE=2>&gt;&gt; users are authenticated, but it boils down to the above.&nbsp; I create a </FONT>
<BR><FONT SIZE=2>&gt;&gt; new session or get an existing session.&nbsp; I do not care which.&nbsp; If the </FONT>
<BR><FONT SIZE=2>&gt;&gt; page being requested needs auth, but the session doesn't contain a </FONT>
<BR><FONT SIZE=2>&gt;&gt; username key, I redirect[1] to the login page, which stores the </FONT>
<BR><FONT SIZE=2>&gt;&gt; username value into the session if the user presents the right </FONT>
<BR><FONT SIZE=2>&gt;&gt; credentials.&nbsp; Otherwise, I serve the requested page, then save the </FONT>
<BR><FONT SIZE=2>&gt;&gt; session, and Bob's a builder.</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; Note that I cannot distinguish between an expired session and no</FONT>
<BR><FONT SIZE=2>&gt;&gt; session at all, but this is a limitation of the Session module.&nbsp; I </FONT>
<BR><FONT SIZE=2>&gt;&gt; can distinguish between a new session and an existing session by </FONT>
<BR><FONT SIZE=2>&gt;&gt; calling session.is_new(), but that distinction turns out not to be </FONT>
<BR><FONT SIZE=2>&gt;&gt; very important.</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; At some point, I will need to extract the sid from the cookie set</FONT>
<BR><FONT SIZE=2>&gt;&gt; myself, to be able to distinguish between a timed out session, an </FONT>
<BR><FONT SIZE=2>&gt;&gt; invalidated session, a missing session and a brand new session.&nbsp; (Or </FONT>
<BR><FONT SIZE=2>&gt;&gt; else I'll have to patch the Session module, which I'm not real keen </FONT>
<BR><FONT SIZE=2>&gt;&gt; to do.)</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; --</FONT>
<BR><FONT SIZE=2>&gt;&gt; bje</FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;&gt; [1] The 'redirects' I do are simply changing what view my code</FONT>
<BR><FONT SIZE=2>&gt;&gt; believes it is processing, so execution continues down the line, and </FONT>
<BR><FONT SIZE=2>&gt;&gt; session.save() is called in due order.&nbsp; If you're using an Apache </FONT>
<BR><FONT SIZE=2>&gt;&gt; internal redirect or a 302/303 redirect, you should ensure new </FONT>
<BR><FONT SIZE=2>&gt;&gt; sessions are saved as soon as created with &quot;if session.is_new(): </FONT>
<BR><FONT SIZE=2>&gt;&gt; session.save()&quot;.</FONT>
<BR><FONT SIZE=2>&gt;&gt; _______________________________________________</FONT>
<BR><FONT SIZE=2>&gt;&gt; Mod_python mailing list</FONT>
<BR><FONT SIZE=2>&gt;&gt; Mod_python@modpython.org</FONT>
<BR><FONT SIZE=2>&gt;&gt; <A HREF="http://mailman.modpython.org/mailman/listinfo/mod_python" TARGET="_blank">http://mailman.modpython.org/mailman/listinfo/mod_python</A></FONT>
<BR><FONT SIZE=2>&gt;&gt;</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; _______________________________________________</FONT>
<BR><FONT SIZE=2>&gt; Mod_python mailing list</FONT>
<BR><FONT SIZE=2>&gt; Mod_python@modpython.org </FONT>
<BR><FONT SIZE=2>&gt; <A HREF="http://mailman.modpython.org/mailman/listinfo/mod_python" TARGET="_blank">http://mailman.modpython.org/mailman/listinfo/mod_python</A></FONT>
<BR><FONT SIZE=2>&gt;</FONT>
</P>

<P><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>Mod_python mailing list</FONT>
<BR><FONT SIZE=2>Mod_python@modpython.org <A HREF="http://mailman.modpython.org/mailman/listinfo/mod_python" TARGET="_blank">http://mailman.modpython.org/mailman/listinfo/mod_python</A></FONT>
</P>
<BR>

<P><FONT SIZE=1>Esta mensagem, incluindo seus anexos, pode conter informa&ccedil;&atilde;o confidencial e/ou privilegiada. Se voc&ecirc; recebeu este e-mail por engano, n&atilde;o utilize, copie ou divulgue as informa&ccedil;&otilde;es nele contidas. E, por favor, avise imediatamente o remetente, respondendo ao e-mail, e em seguida apague-o. Este e-mail possui conte&uacute;do informativo e n&atilde;o transacional. Caso necessite de atendimento imediato, recomendamos utilizar um dos canais dispon&iacute;veis: </FONT><A HREF="http://www.bankboston.com.br"><U><FONT SIZE=1>Internet Banking</FONT></U></A><FONT SIZE=1> , </FONT><A HREF="http://www.bankboston.com.br/bpt"><U><FONT SIZE=1>BankBoston por telefone</FONT></U></A><FONT SIZE=1> ou ag&ecirc;ncia/representante de atendimento de sua conveni&ecirc;ncia. Agradecemos sua colabora&ccedil;&atilde;o.</FONT></P>

<P><FONT SIZE=1>This message, including its attachments, may contain confidential and/or privileged information. If you received this email by mistake, do not use, copy or disseminate any information herein contained. Please notify us immediately by replying to the sender and then delete it. This email is for information purposes only, not for transactions. In case you need immediate assistance, please use one of the following channels: </FONT><A HREF="http://www.bankboston.com.br"><U><FONT SIZE=1>Internet Banking</FONT></U></A><FONT SIZE=1> ,&nbsp; </FONT><A HREF="http://www.bankboston.com.br/bpt"><U><FONT SIZE=1>BankBoston by phone</FONT></U></A><FONT SIZE=1> or branch/relationship manager at your convenience. Thank you for your cooperation.</FONT></P>

</BODY>
</HTML>