Malacious Request

Discussion in 'PHP' started by ajay009ajay, Jun 1, 2010.

  1. #1
    What is MALICIOUS REQUEST in php , How will i decline it from my project ?
     
    ajay009ajay, Jun 1, 2010 IP
  2. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #2
    To prevent malicous requests/attempts validate and sanitize user submitted data.

    When sanitizing and validating take into consideration the following functions:

    mysql_real_escape_string() (escape bad character, to prevent sql injection)
    preg_match() (validate data using an expression)
    intval() (ensure value is int)
     
    danx10, Jun 1, 2010 IP
  3. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #3
    May be incorrect values in cookies!
    Just clear cookies and cache try again!
     
    roopajyothi, Jun 1, 2010 IP
  4. Pudge1

    Pudge1 Well-Known Member

    Messages:
    912
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    140
    Digital Goods:
    1
    #4
    You could start by showing us your code.
     
    Pudge1, Jun 1, 2010 IP
  5. mehmetm

    mehmetm Well-Known Member

    Messages:
    134
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #5
    always filter the user submitted data (requested).
    that means form the variable as the way you want. So you would prevent any malicious code user would submit..
     
    mehmetm, Jun 1, 2010 IP