Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion on handling input() calls to prevent injection
#1
I might have mentioned this on IRC before, but it might be a good thing to consider looking at the amount of string sanization bugs i reported to various coders over the few weeks, and considering the human factor, it will most likely happen again.

The possible solutions for this, should both be quite easy to implement, and maintain.. And should most likely prevent future issues with string sanitation.
  • Create a preprocessor macro to replace input() with safe_input()
  • Run a find/replace and replace input() with safe_input()

This can also be a total shit suggestion, maybe i shouldnt submit suggestions at 8AM while being super sleepy, heh.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)