26
10Dev
3y

My own personal hell was a html page that had a script tag that called a rest endpoint that sent back a text block of JavaScript that was then dynamically executed to redirect the user to a php 3 page that was the exact same thing as the original page but with an extra bit of css to make the buttons blue and slightly rounded

You can’t make this shit up

Comments
  • 0
    So I guess they’re against just writing the javascript manually like most people?
  • 1
  • 0
    The things we do for some money !!!
  • 1
    @TeachMeCode even then there a about 5 better ways to do it. Only reasons I can think of is over engineering or rookie made it work. It is dynamic as fuck. I've once seen a framework with similar injection features abused by the webdesigner/webmaster
  • 0
  • 2
    oh wow. that's giving me flashbacks to AVG website - php 5 with a homebrew templating/widget system where custom tags would trigger load of that widget either from a file, or from database...

    the widget code was a mix of html, js, php, and... you guessed it, other custom widget tags, which would trigger load of that widget either from a file or from a db.

    i got a task to change the example serial number on the product registration page.

    it legitimately took me 8 hours of nonstop, no-slacking work to even trace down where the fuck that bit of text was.

    14 levels of nested widgets deep, making the code bounce back and forth between main app, db to load widgets which loaded widgets living in files, which loaded widgets in db, etc etc...

    every single page load on their site is making between 150 to 400 db queries because of this.
Add Comment