Headers and security

Discussion in 'PHP' started by Matt Ridge, Sep 23, 2011.

  1. #1
    Ok, after reading a lot today, I need an answer... it seems to me that the header will allow security protocols, but my problem is that it seems to me that the code to allow the name/pass to be entered is open in the clear, and is not very secure. Is it me thinking that, or have I not learned what I need to, to realize that it is secure, even though there is no real proof showing that it is?
     
    Matt Ridge, Sep 23, 2011 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    What are you doing that would pass a name and password in the header?
     
    jestep, Sep 23, 2011 IP
  3. jevchance

    jevchance Peon

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    2
    Trophy Points:
    0
    #3
    If you are passing sensitive information to or from the user's web browser, you need to set up an SSL certificate with your web host. You can contact them and they will do it for you (it will cost money).

    After that, you can use code like this to be sure you are using the SSL.

    if($_SERVER["HTTPS"] != "on") {
       header("HTTP/1.1 301 Moved Permanently");
       header("Location: "https://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]);
       exit();
    }
    Code (markup):
     
    jevchance, Sep 23, 2011 IP
  4. shivgupta0001

    shivgupta0001 Peon

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Its is secure.

    If you will try look look the process working behind this you will be surely satisfied.
     
    shivgupta0001, Sep 28, 2011 IP
  5. Matt Ridge

    Matt Ridge Peon

    Messages:
    166
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #5
    Nothing yet, sorry for the late delay other things have come up. I was learning from a book, and it really never went into detail that I would of liked to of seen.
     
    Matt Ridge, Sep 29, 2011 IP