Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-30-2011, 09:47 PM
kingcj kingcj is offline
Registered User
kingcj's Avatar
Join Date: Apr 2006
Location: TN
Posts: 114
kingcj will become famous soon enough
Send a message via MSN to kingcj
Yes it does, however, you send the text and use params[1] as well, which is what I was under the impression was unsafe. I don't understand how yours is more secure is what I was trying to say.
__________________
Zie

"It is not necessary to change. Survival is not mandatory." - W. Edwards Deming
Reply With Quote
  #2  
Old 03-30-2011, 10:00 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
The unsafe part was sending the account name through the trigger since hackers could manipulate it to affect someone else. Sending a new nickname doesn't have the same safety concerns. There are ways to protect it but completely unnecessary.
Reply With Quote
  #3  
Old 03-30-2011, 10:01 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by kingcj View Post
Yes it does, however, you send the text and use params[1] as well, which is what I was under the impression was unsafe. I don't understand how yours is more secure is what I was trying to say.
The 'unsafe' part was sending the account that you wanted to change the nickname for. Sending player input was fine however.
__________________
Quote:

Last edited by fowlplay4; 03-30-2011 at 10:01 PM.. Reason: oh forums...
Reply With Quote
  #4  
Old 03-30-2011, 10:01 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by kingcj View Post
Yes it does, however, you send the text and use params[1] as well, which is what I was under the impression was unsafe. I don't understand how yours is more secure is what I was trying to say.
The issue is not with using the params array. Do you understand how parameters work?

PHP Code:
function onCreated() {
  
myFunction("one""two""three");
}

function 
myFunction() {
  echo(
params[0] @ ", " params[1] @ ", " params[2]);

is exactly the same as

PHP Code:
function onCreated() {
  
myFunction("one""two""three");
}

function 
myFunction(p1p2p3) {
  echo(
p1 ", " p2 ", " p3);

When you put variable names inside the parentheses like that, you're assigning the parameter values to those variables.

The security problem I referenced was in relation to sending the player's account. The script Twinny posted is fine, as was yours.

edit: wow way too slow
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:57 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.