Trimming of variables should be done before they are inserted into the
database. Wherever your entering username into the database you should
make sure that you trim all variables going in.

I also recommend using the 'is' operator on string values and the 'eq'
operator on numerical values. For example:

<cfset myVar=100>
<cfif variables.myVar eq 100>true<cfelse>false</cfif>

<cfset myVar='test'>
<cfif variables.myVar is 'test'>

Robert Orlini wrote:

> The trim function fixed everything in this part:
>
>
> <CFQuery Name="getuser" Datasource="wweb_status">
> Select * from admin
> Where username = '#trim(session.username)#'
> </CFQUERY>
>
>
> and here as well:
>
>
> <CFIF trim(getuser.priority) EQ "high">
> <option value="custom">Custom Status Message</option>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to