Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Algorithm: variable replacement #2

Open
Quirinus opened this issue Feb 12, 2015 · 1 comment
Open

Algorithm: variable replacement #2

Quirinus opened this issue Feb 12, 2015 · 1 comment

Comments

@Quirinus
Copy link
Owner

If there's a longer variable name that contains a smaller variable name, it might get wrongly replaced.
Should find a way to replace that fixes that. Probably check if some variable names contain others, and then replace in such a way that they don't double replace and mess things up. I guess this isn't an issue as long Zippyshare doesn't use variable names that are longer than one character.

@Eric678
Copy link

Eric678 commented Jan 31, 2019

It is a problem if those single letter variable names match other text - here is the resulting $algorithm_variables_code just before eval() attempted:
v$ar $a = fun$ction() {return 1};
v$ar $b = fun$ction() {return $a() + 1};
v$ar $c = fun$ction() {return $b() + 1};
v$ar $d = $do$cument.getElementByI$d('omg').getAttri$bute('$cl$ass'); if (true) { $d = $d*2;}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants