SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jan 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to Prevent Injection?

    Hello to everyone.The javascripts files in my website are constantly getting injected with malicious codes which redirects my website,can any one please tell me how do i stop such injections?the website is in php.I am a newbie with website programming so really need help with it .

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    This is nothing to do with your actual javascript. If someone is injecting code into your websites, this is happening on the server. You need to find out how they're doing this, and it probably isn't related to PHP either, as the code is probably being injected directly into the .js file itself. It's probably someone gaining access to your server. Perhaps you should contact your hosting provider or post your question in the Server Management forum.

  3. #3
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,115
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Hi,

    I think you are most likely talking about Cross Site Scripting or XSS.
    It happens when you serve something on a page that has come directly from the user without proper validation.

    An example could be where you are accepting HTML for a blog post, someone could post a redirect script that you are then writing into the 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
  •