mIRC Home    About    Download    Register    News    Help

Print Thread
/timer switch to prevent parameter evaluation #223133 15/07/10 09:38 AM
Joined: Dec 2002
Posts: 344
D
drum Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 344
I'd like to suggest a switch for /timer that will prevent the timer's parameters from being evaluated when it performs its action. This feature would make it simple to avoid security problems related to the undesired double evaluation of parameters passed through timers.

For example:

//timer 1 1 echo -s I have $!100 to spend.
Quote:
I have to spend.


//timer -n 1 1 echo -s I have $!100 to spend.
Quote:
I have $100 to spend.


In addition, the switch should treat all text as plain text (vertical bars, braces, etc.). For example:

//timer 1 1 echo -s a $chr(124) echo -s b
Quote:
a
b


//timer -n 1 1 echo -s a $chr(124) echo -s b
Quote:
a | echo -s b


Essentially the distinction would be the same as performing a command in the editbox using one or two slashes.

There are already some scripting-based workarounds to solve these issues, but they add unnecessary complexity and can often be confusing.

Re: /timer switch to prevent parameter evaluation [Re: drum] #223135 15/07/10 12:41 PM
Joined: Dec 2002
Posts: 2,025
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,025

Originally Posted By: drum
... a switch for /timer that will prevent the timer's parameters from being evaluated when it performs its action...

There are already some scripting-based workarounds to solve these issues, but they add unnecessary complexity and can often be confusing.

I agree.

Re: /timer switch to prevent parameter evaluation [Re: drum] #223153 15/07/10 08:47 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Agreed. Should also be added for /scid, /scon and /flash.

Re: /timer switch to prevent parameter evaluation [Re: drum] #223159 16/07/10 02:46 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Agreed.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: /timer switch to prevent parameter evaluation [Re: hixxy] #223382 22/07/10 11:07 AM
Joined: Dec 2002
Posts: 344
D
drum Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 344
This could be useful with /dde and $dde as well.