Help with MYSQL Leak
Hey all what are the common problems for data leaking into other players stats for example my plugin im making that stores points will some times give the next player that joins the same points loaded for the first player. Iv rewriten my mysql part of my plugin 3 times now all using different ways to save/load data but it still leaks data. is there a reason for this and can someone explain how i can fix it.
PHP Code:
|
Re: Help with MYSQL Leak
code might help
|
Re: Help with MYSQL Leak
Woops i completely forgot ill add that now.
|
Re: Help with MYSQL Leak
It looks fine to me. I would use print statements in code when a client joins and disconnects, and trace your code's execution that way.
The only way I can possibly think that this code bugs out, assuming this is the only querying code that exists, is if GetClientAuthString is busted on SM's end and it returns the wrong steam ID somehow. (I vaguely remember this being an actual bug... though I'm not entirely sure.) |
Re: Help with MYSQL Leak
Ok thanks.
|
Re: Help with MYSQL Leak
Quote:
If a client's Steam ID isn't validated yet, and calling GetClientAuthId with validate=true, and the client's ID isn't validated by Steam yet, and not checking for GetClientAuthId returning false (failure), and using decl instead of new (or the transitional syntax), you can have another client's Steam ID (or just garbage) in the buffer, since decl doesn't initialize it to anything. TL;DR, don't use decl, and check the return of GetClientAuthId (or pass "false" for validate, but ONLY if you know what you're doing and it's safe to do so in your case). |
Re: Help with MYSQL Leak
Could you please give me an example on how to validate a steamid? or do i just set GetClientAuthId end argument to true?
|
Re: Help with MYSQL Leak
Quote:
PHP Code:
|
Re: Help with MYSQL Leak
Thanks for that. I have tryed it and allowed up to 30-40 people to use the store database how ever out of the 40 5-10 seem to have duplicated data i dont know why its still leaking data from others.
|
All times are GMT -4. The time now is 13:46. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.