SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2008
    Location
    Sydney, Australia
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question 404ing invalid get/post data

    Hi, I was wondering whether sites should silently accept invalid get/post data or not?

    e.g. if someone tries to add a ?id=20 to a static page. Should you tell them the request is wrong by 404ing or just ignore it?

    Same question with post data, e.g. an additional invalid field. Should you reject the entire request or just ignore it?

    Ignoring it may result in the client thinking their data was processed successfully which isn't good.

    What do other people think?

    Edit: Something to note. Google returns a 404 for invalid get data...

  2. #2
    SitePoint Guru SSJ's Avatar
    Join Date
    Jan 2007
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think it will affect your site's performance if you have static site and they are adding any no of parameters. But if you have dynamic site then you need to take care of it.

    I am always checking it via dynamic PHP or ASP code and giving an error if any one tried any hacks.

    You can set it via IIS also where you need to set the default Error Page


Bookmarks

Posting Permissions

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