Frontend HTTP Authentication works only in case of "Basic Authentication" and PHP Safe_mode Off

XMLWordPrintable

    • Type: Incident report
    • Resolution: Duplicate
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Component/s: Frontend (F)
    • None

      When enabling HTTP Authentication on Zabbix Frontend, I noticed that the index.php will look for the $_SERVER['PHP_AUTH_USER'] in order to know if the user is logged in and which authorizations it should have.
      However, the PHP_AUTH_USER variable will not be availabled if:

      • PHP SafeMode is on
      • HTTP Digest Authentication

      I'm not a web developer and I don't know what are the implications, but using the $_SERVER['REMOTE_USER'] instead of $_SERVER['PHP_AUTH_USER'] will solve both the issues and probably some other.
      There are similar bug requests like: ZBX-3779, ZBX-6260, ZBX-5513

      Attached a simple tested patch

            Assignee:
            Unassigned
            Reporter:
            Gabriele Armao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: