Find the answer to your Linux question:
Results 1 to 4 of 4
Is it secure to call Code: system("export IFS=' \t\n'; /bin/ls ");...
  1. #1
    Just Joined!
    Join Date
    Apr 2005
    Posts
    5

    system()

    Is it secure to call

    Code:
    system("export IFS=' \t\n'; /bin/ls ");

  2. #2
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    yea it is.
    You can make a mess out of your Local Vars but yea it is safe
    New Users, please read this..
    Google first, then ask..

  3. #3
    Just Joined!
    Join Date
    Apr 2005
    Posts
    5
    But if I append userinput to the system()-command I have to filter characters like ";", "|" and "$", right?

  4. #4
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    yea, since else its easy exploitable.
    Well I dont even get why you want that :S
    If a user can add its own stuff there you really have to filter alot.
    Better "" everything they send. aswell
    New Users, please read this..
    Google first, then ask..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...