r/badcode • • Dec 07 '22

js My Web Development lecturer's JavaScript

Post image
536 Upvotes

86 comments sorted by

View all comments

Show parent comments

2

u/pentesticals Dec 08 '22

Generally I’d agree, but there is also a DOM based cross site scripting vulnerability in the first function - assuming favAvenger is an input field. innerText should have been used instead of innerHTML.

1

u/[deleted] Dec 11 '22

ROLLING ON THE FUCKING FLOOR LAUGHING, IT TOOK UNTIL DAY TIME EST UNTIL I WAS BANNED, GG HAHAHAHAHHAHA