Hey, Mark.

Thanks a lot for your suggestion! However, I'm 
afraid that's not the case. I had already 
reviewed that, and it still makes no sense to me. 
In a previous reply I said that I get the user's 
id (and other variables) for each script checking 
the user name and password stored in cookies, and the situation is:

Client A with user 'lalala' and password 'yay' 
has ID 30 and wants to send a SMS via the SMS 
gateway, so it goes to the page, fills in the fields and clicks on 'send'.

Client B with user 'hehehe' and password 
'yeppers' has ID 45 and is checking an incoming call.

In the end, in the table of sent SMS's it stored 
the ID 45 instead of the 30 for that SMS.

The script would first check application.cfm, 
which checks the stored cookies 'lalala' and 
'yay' and returns 30, checks that the user has 
permission to send SMS's and then sends the SMS 
and if it went well, it stores it in the DB.

So... it makes no sense at all to me! I mean... 
ID 45 didn't even have permission to send 
SMS's... I thought that every time a script was 
executed, it did so isolatedly..

At 17:06 22/05/2008, you wrote:
>Caching is not going to be your problem unless the "user" query you are
>caching is exactly the same from one user to another:
>
>SELECT * FROM
>Users WHERE  userID='AAAAAB'
>
>Would be a different item in the cache than...
>
>
>  SELECT * FROM
>Users WHERE  userID='AAAAAC'
>
>
>....even if everything in the query is exactly the same.
>
>I would say you have 2 possibilities:
>
>1) Session hijack issue - where what is getting crossed and "borrowed" by
>user A from user B is actually the sessionID in the cookie or URL. This can
>happen a number of ways....
>
>2) Transactional integrity - this has to do with the way you "set" the
>cookie or parameter you are using. For example, if you do the following (as
>I saw recently)
>
>         <cfquery >
>                Insert into myTable (col1, col2)
>         </cfquery>
>
>         <cfquery name="x" ...>
>         SELECT max(userid) from myTable
>         </cfquery>
>
>         <cfcookie value="#x.userid#" ...>
>
>
>You have created a situation that would look exactly as you describe. User A
>would do his insert at virtually the same moment as user B and both of them
>could end up with the same USERID. It would also occur by chance and be hard
>to duplicate. It is preventable by rethinking the insert / id process. Also,
>on your insert tables add a "createdDate" column and set the default to
>getDate() .. When the problem occurs you can "look up" the two users and
>examine the created date. If both the date times for the 2 records are
>virtually the same (tiny milliseconds apart) then you know this is your
>problem.
>
>Happy hunting :)
>
>-Mark
>
>
>
>
>
>Mark A. Kruger, CFG, MCSE
>(402) 408-3733 ext 105
>www.cfwebtools.com
>www.coldfusionmuse.com
>www.necfug.com
>
>-----Original Message-----
>From: KDJ The Net Surfer [mailto:[EMAIL PROTECTED]
>Sent: Thursday, May 22, 2008 9:25 AM
>To: CF-Talk
>Subject: Help! I get someone else's variables!
>
>Dear guys, thanks in advance for your help!
>
>My problem is that I've developed this huge application (a kind of
>CRM) and it's been working fine for years, but lately it's doing something
>odd: sometimes when somebody is going to do something (like, for example,
>creating a new date in their calendar), the application will take the wrong
>user id (which I suppose it's the user id of someone else working on the
>website at the same time).
>
>I have no idea why it's doing this, but I guess that CF is catching certain
>kind of queries. Maybe it's because I'm making every script to check the
>database every time it's executed and sometimes it returns the last query (a
>catched one) instead of doing the query with the provided data again?
>
>The bad thing is that I *can't* reproduce the behaviour. it happens
>seemingly randomly every other 3 weeks or month... but sometimes 2 days in a
>row.. this is very annoying and of course, insecure, so my customers are
>beginning to complain, and of course they won't take the 'it just happens
>once every Xk actions'. This should *never* happen.
>
>I tried to make the queries non-cacheable, but I wonder if there's a
>definitive way to make sure that coldfusion is *always* making a query and
>*never* catching it and returning the last result?
>
>Hope I explained myself well. Thank you!
>
>Oscar.-
>__  __  ___  ____
>| \/ / |   \ \__ | JC1: "Que pasa, tio?!" \\\\\\
>|   <  | |> \   || JC2: "El tiempo.." //////////
>|_/\_\ |____/   /|     http://www.disneymania.ws
>   ______________//  http://www.amazingdollars.com /______________/
>http://www.lionking.org/~nyanya
>
>
>
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306793
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to