Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-19037

Implement getremoteaddr() in all places where $_SERVER['REMOTE_ADDR'] is used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.9.5
    • 1.9.4
    • Libraries
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • Easy

      getremoteaddr() is designed to get the best IP for the current user, with settings so that the admin can even control the way it works.

      We should be using it consistently everywhere, but currently there are still places where we are not and are accessing $_SERVER['REMOTE_ADDR'] directly

      ie:

      auth/cas/cas_ldap_sync_users.php
      auth/db/auth_db_sync_users.php
      lib/moodlelib.php
      lib/form/recaptcha.php
      mnet/remote_client.php
      mod/resource/type/file/resource.class.php
      mod/resource/type/repository/resource.class.php

      Dongsheng, can you carefully fix these for 1.9.5 please?

            dongsheng Dongsheng Cai
            dougiamas Martin Dougiamas
            Petr Skoda Petr Skoda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.