Skip navigation
Currently Being Moderated

registration page over http

Aug 5, 2012 12:26 PM

Hi,

I have created a user registration page, and login page, that is accessed over http.

On each page the browser gets the pages where a form is presented, the form is posted back to the same page for validation before being entered into the database.

The only sensitive information in the forms is the user password which is encrypted after the form is posted and before being added to the database.

Is this method I am using safe? as in safe from attack? or do I need to use https?

 

Any advise would be much appreciated.

Thank you in advance.

 
Replies
  • Currently Being Moderated
    Aug 7, 2012 3:36 AM   in reply to tessimon

    What keeps you safe from attack is not the choice of http or https, but the security measures in your validation. If you're filtering out HTML and script tags, checking that the user input matches your criteria, and escaping values inserted in the database, you should be OK.

     

    The value of using https is that others cannot eavesdrop on unencrypted data being sent to the server. But if your validation and SQL injection prevention measures are inadequate, using https is meaningless.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 7, 2012 10:21 AM   in reply to tessimon

    tessimon wrote:

     

    When you mention filtering out HTML and script tags, please could you confirm that when I validate user input through the registration form, the fact that I check that the fields are only filled with letters, numbers or spaces is enough? If script tags were input an error would result but I am unclear on what you mean by filtering HTML.

    That should be sufficient because HTML and script tags contain non-alphanumeric characters, so should be rejected by your validation. However, it's important that the validation is done by your server-side script. You cannot rely on JavaScript validation. If an attacker bothers to use a browser (instead of an automated script), you can bet your bottom dollar that JavaScript is disabled. JavaScript validation is only a courtesy to the user to prevent a round-trip to the server if there's an error in the input.

     

    I have not put in place any checks that the values received through the url are what I am expecting let alone checking that they are only filled with letter or numbers to prevent script tags, should I also be checking these values when I check isset()

    Every new page is a potential hole in your security. You must always check values passed through a URL. Even though the user is logged in with a session, you can't rely on that keeping you secure.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points