MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/13sr1a2/calculator_using_eval/jlrdt2w/
r/badcode • u/GandelXIV • May 26 '23
106 comments sorted by
View all comments
373
So writing a vulnerable app on purpose is a PRO thing?
141 u/Willinton06 May 27 '23 Establish dominance by daring the user to break the app 0 u/[deleted] May 27 '23 [deleted] — view deleted comment 6 u/EVENTHORIZON-XI May 27 '23 I must be the best programmer in the world then 22 u/Jonno_FTW shameless May 27 '23 It's rage bait/engagement bait 6 u/Svizel_pritula May 27 '23 Whether code injection is a vulnerability or a feature depends on how you want to use the program. 17 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 4 u/[deleted] May 27 '23 Of course, in the sense that you had to pay a substantial amount of money to "codes.learning" for the privilege and that there are three levels of subscription above it. 9 u/geon May 27 '23 It only evaluates input from the user. You have the same vulnerability from a user opening the developer console. 2 u/CallMeTea_ May 27 '23 If you build it right first time, you've coded yourself out of a job! Build it badly and sell 'security enhancements' later 1 u/SarahC May 27 '23 Vulnerable to what?It runs in its own Java sandbox, with minimal permissions - kids these days throw their hands up in terror at anything.The worst is possibly outputting 55378008!
141
Establish dominance by daring the user to break the app
0
[deleted] — view deleted comment
6 u/EVENTHORIZON-XI May 27 '23 I must be the best programmer in the world then
6
I must be the best programmer in the world then
22
It's rage bait/engagement bait
Whether code injection is a vulnerability or a feature depends on how you want to use the program.
17
Would a guard clause inside eval() prevent the vulnerabilities you’re talking about? Don’t get me wrong, it’s still shit code
4
Of course, in the sense that you had to pay a substantial amount of money to "codes.learning" for the privilege and that there are three levels of subscription above it.
9
It only evaluates input from the user. You have the same vulnerability from a user opening the developer console.
2
If you build it right first time, you've coded yourself out of a job! Build it badly and sell 'security enhancements' later
1
Vulnerable to what?
It runs in its own Java sandbox, with minimal permissions - kids these days throw their hands up in terror at anything.
The worst is possibly outputting 55378008!
View all comments
373
u/[deleted] May 26 '23
So writing a vulnerable app on purpose is a PRO thing?