<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
On 11/08/2010 23:15, Sergio Rabellino wrote:
<blockquote cite="mid:4C6320FF.7000303@di.unito.it" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
<br>
<br>
Jules ha scritto:
<blockquote cite="mid:4C60121C.30604@ZendTo.com" type="cite">
<pre wrap="">On 09/08/2010 12:48, Sergio Rabellino wrote:
</pre>
<blockquote type="cite">
<pre wrap="">In my code-checks i've found that the auth code is inserted twice and
only the latest is used.
I suggest to remove in lib/Verify.php the lines from 163 to 168.
</pre>
</blockquote>
<pre wrap=""><!---->Where is the other instance?
</pre>
</blockquote>
It's in Verify.php too, line 219, but in another func.<br>
</blockquote>
It's not quite as simple as that, as in the sub initWithFormData called
from "new Verify()" it is needed when approving an authenticated user
who doesn't get send the email. So if anything, it should be removed
from the code that sends the email $verify->sendVeryifyEmail() and
not from initWithFormData().<br>
Do you agree?<br>
I'm going to leave it alone for now as it doesn't actually cause any
damage at all, but I would like to hear your thoughts on the question.<br>
<blockquote cite="mid:4C6320FF.7000303@di.unito.it" type="cite"><br>
<blockquote cite="mid:4C60121C.30604@ZendTo.com" type="cite">
<blockquote type="cite">
<pre wrap="">A question: there is any reason about the removal of any international
chars from name and organization ?
</pre>
</blockquote>
<pre wrap=""><!---->Me being paranoid about people putting nasty characters into databases
and HTML.
</pre>
<blockquote type="cite">
<pre wrap="">I've adapted my code to write down utf8 strings into mysqldb
</pre>
</blockquote>
<pre wrap=""><!---->How do I do that?
</pre>
</blockquote>
First of all the tables must be created/altered to support utf8 chars:
I did an alter from phpmyadmin setting the collation tu utf8-general-ci
(case insensitive). Then creating the connection to the db, the first
sql statement is<br>
<br>
DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;<br>
<br>
to be sure that client and server share the same charset. (If you are
paranoid, you can lately check if it's true, asking thru php the
current charset/collation).<br>
Then the code must be changed, encoding/decoding the strings from/to
web forms, removing also the regex check for user typing.<br>
If all of this convince you, i can send all the changes (8/10 lines
somewhere).<br>
As far as i know, utf8 is backward compatible to ascii chars, so no
dual code is required, and today asking for an utf8 mysql table it's a
must for many (L)AMP apps.<br>
</blockquote>
I'm not wholly convinced, but send me the code anyway, so I can put it
in (possibly commented-out for now).<br>
<br>
<blockquote cite="mid:4C6320FF.7000303@di.unito.it" type="cite">
<blockquote cite="mid:4C60121C.30604@ZendTo.com" type="cite">
<blockquote type="cite">
<pre wrap="">and i do not see any evidence of problem about it: i'm wrong ?
</pre>
</blockquote>
<pre wrap=""><!---->I just want to be absolutely doubly sure that people cannot put evil
text in it, which is very easy to allow by mistake.
</pre>
</blockquote>
I understand, but in italian language (and in many other languages) the
'special' chars are often used: university-> università ....<br>
</blockquote>
Ah, that does explain a good use for it, which definitely helps
convince me :-)<br>
<br>
<blockquote cite="mid:4C6320FF.7000303@di.unito.it" type="cite">
<blockquote cite="mid:4C60121C.30604@ZendTo.com" type="cite">
<pre wrap="">Jules
</pre>
</blockquote>
I hope my written english it's enough to be understood.<br>
</blockquote>
No problem there!<br>
<br>
Cheers,<br>
<pre class="moz-signature" cols="72">Jules
--
Julian Field MEng CITP CEng
<a class="moz-txt-link-abbreviated" href="http://www.ZendTo.com">www.ZendTo.com</a>
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
Follow me at twitter.com/JulesFM
</pre>
</body>
</html>