+ Reply to Thread
Results 1 to 10 of 10

Thread: ASPROX SQL Injection Attacks

Hybrid View

  1. #1

    Default

    I don't have time to really go into this right now as I'm headed to bed ...

    I'm also not really an expert, I just remember reading some things in these boards from the real experts about it. Here is what I do:

    1. Try never to allow arbitrary code from the URL (I try hard not to use the $_GET function. I typically only use $_POST.
    2. I always make sure that the form submission parser I make looks for the actual form to be submitted. Sometimes I name the submit button something strange and then I look for that at the start of my parsing code:

    Code:
    <!-- Input Form HTML -->
    <form>
    ..........
    <input type="submit" name="submit" value="Register" />
    </form>
    PHP Code:
    /****
    * php page for parsing form submission data
    *
    ****/
    <?php
     
    if $_POST['submit'] {
     
    /* Do something with the form data */
     
    } else {
      echo 
    "The form wasn't submitted properly. Please Try again.";
    }
    ?>
    There are other things to do also, like make sure only certain characters are present in certain form fields.

    If someone is submitting a first and last name, there should only be alpha characters present in the field. If someone is submitting an email address, make sure it is a valid format and doesn't contain any illegal characters. In textareas, make sure there are no HTML characters present. Basically, make sure there is nothing but raw text.

    There are a bunch of other things to do as well but they get more advanced, and as I said, I can't get into it right now!

    ~regards
    Last edited by shadmego; 08-09-2008 at 11:34 PM. Reason: hit the Enter key prematurely ... tired
    He is no fool that gives what he cannot keep to gain what he cannot lose. - Jim Elliot
    4ChristMinistry.org - Web development tutorials and Community forum.
    Demos - Kicking the tires on some popular software.

+ Reply to Thread

Tags for this Thread

Posting Permissions

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