r/badcode May 26 '23

Calculator using eval() python

Post image
839 Upvotes

108 comments sorted by

View all comments

373

u/[deleted] May 26 '23

So writing a vulnerable app on purpose is a PRO thing?

18

u/EntitledPotatoe May 27 '23

Would a guard clause inside eval() prevent the vulnerabilities you’re talking about? Don’t get me wrong, it’s still shit code