Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-11742

cluster: fix warning when index_image_xxx.php accessed without rewrrite rules

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Medium Medium
    • None
    • 3.10.0, 3.9.4, 4.0.0alpha2
    • Legacy > Clustering
    • None

    Description

      when no rewrite rule is set up and user accesses the index_image scripts, a php warning is generated - possible security pbl if server is not setup correctly (ie. information leak)

      possible fix: test for existence of $_SERVER['SCRIPT_URL'] before using it

      if ( !isset( $_SERVER['SCRIPT_URL'] ) ) {
      _die( "Please use a virtual hosting setup to access this script.\n" );
      }
      $filename = ltrim( $_SERVER['SCRIPT_URL'], "/" );

      (to be moved just before connection to database)

      alternative fix: use a different server variable instead of crapping out - but I do not see much of an advantage there, except for testing...

      Attachments

        Activity

          People

            unknown unknown
            72f8acac-185f-4a54-9470-a7473f50daab@accounts.ibexa.co Gaetano Giunta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: