• 6
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I have two webapps.

Both are used for testing in a reverse proxy scenario.

SAN certificate is used (Subject Alternative Name) for both.

1 allows adding a security exception, the other does not.

The one that allows has HSTS header only in one page add in the PHP code itself:

<?php header("strict-transport-security: max-age=600"); ?>

The other - no idea, I dont have access to the source code.

Possible reasons on why 1 can have an exception and the other can't would be very helpful to me. Thank you.

enter image description hereenter image description here

HSTS is used by the operator of a web server or web application as a better protection against man in the middle attacks. It tries this by addressing the following ways for man in the middle

  • Replacing HTTPS links with HTTP, i.e. sslstrip attack: The browser will not allow HTTP access to sites where it knows (from earlier visits) that this site enforces HTTPS.
  • SSL man in the middle with a fake certificate in the hope that the user will just add an exception to "get the free iPad" or whatever kind of social engineering is used: This is done by denying HSTS sites this exception.

Thus these restrictions are an explicit choice of the site operator to add better security even for the non-technical users.

  • 4
Reply Report
      • 2
    • Yea, but I can add an exception to one of the sites - the one here I controle the origin. I added them with: . Why can the behavior be different? ... I added this header only to 1 page of the site.
      • 1
    • @MindaugasBernatavi?ius: it might be that the client did not see the HSTS header yet because it did not visit the page in question. Or it might be that your code is wrong and the header was not sent (i.e. calling header after sending other content). Once the client has seen this header for the site it should not allow any exceptions.
      • 2
    • Thanks Steffen, so exceptions should never be allowed for any user-agent that respects the RFC for HSTS? Correct? .. I'm adding my code for reference (I really want to understand this and appreciate your help). This is the code: p.defau.lt/?OVrARCUELq5H2XlJtND9Vg ... let me know what else can I check.
    • @MindaugasBernatavi?ius: yes, see RFC 6797, page 9: 7. UAs need to prevent users from "clicking through" security warnings. Halting connection attempts in the face of secure transport exceptions is acceptable. Apart from that the code looks ok for me, so maybe the client did not visit this specific page yet.

Trending Tags