by donatj · 2y ago · 0 comments
eval($var . '="' . str_replace('"', '\\\\"', $itm) . '";');
Why? Dear god why. Please stop.PHP provides a built in escaper for this purpose
eval($var . '=' . var_export($itm, true) . ';');
But even then you don't need eval here! ${$var} = $itm;
Is all you really needed... but really just use an array(map) if you want dynamic keys... don't use dynamically defined variables...It’s not that PHP somehow makes people write terrible code, I think it’s just the fact that it’s been out for so long and so many people have taken a crack at learning it. Plus, it seems that a lot of ingrained habits began back when PHP didn’t have many of its newer features and they just carried on, echoing through stack overflow posts forever.
IMO it’s because php and js are so easy to pick up for new programmers.
They are very forgiving, and that leads to… well… the way that php and js is…
(to include the ones that appeared in the time I spent typing this post)
It's a very similar exploit.
The main use I know of goes away with workers.
Mind you this was more than ten years ago when PHP was fixing exploits left and right.
This dust up resolved itself within 24 hours though, as I came in the next morning to find he was too busy to work on something else because he was having to patch the PHP forum software he administered because it had been hacked overnight.
I did not gloat but I had trouble keeping my face entirely neutral.
Now I can’t read PHP for shit but I tried to read the patch notes that closed the hole. As near as I could tell, the exact same anti pattern appeared in several other places in the code.
I can’t touch PHP. I never could before and that cemented it.
A developer who has the aptitude to write a whois client, but knows neither of those things? It just seems very unlikely.
I left Amazon 2020. Had various collaborations with ecommerce (mainly around fulfillment) and there was plenty of Mason around.
So kind of both.
I think the word you’re looking for is “epic” or “legendary”
What would you use to build and self-host an ecommerce site quickly and that is not a SaaS?