Author: jfthomps
Date: Wed Oct 28 17:26:27 2015
New Revision: 1711072

URL: http://svn.apache.org/viewvc?rev=1711072&view=rev
Log:
VCL-914 - VCL web utils.pm may block NCCU access

utils.php: modified initGlobals: commented out example code that sets skin 
based on IP address

Modified:
    vcl/trunk/web/.ht-inc/utils.php

Modified: vcl/trunk/web/.ht-inc/utils.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/utils.php?rev=1711072&r1=1711071&r2=1711072&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/utils.php (original)
+++ vcl/trunk/web/.ht-inc/utils.php Wed Oct 28 17:26:27 2015
@@ -160,11 +160,7 @@ function initGlobals() {
        if(! $authed) {
                # set $skin based on cookie (so it gets set before user logs in
                #   later, we set it by affiliation (helps with 'view as user')
-               if(preg_match('/^152\.9\./', $_SERVER['REMOTE_ADDR']) ||
-                       (array_key_exists('VCLSKIN', $_COOKIE) && 
$_COOKIE['VCLSKIN'] == 'EXAMPLE1')) {
-                       $skin = 'example1';
-               }
-               elseif(array_key_exists('VCLSKIN', $_COOKIE)) {
+               if(array_key_exists('VCLSKIN', $_COOKIE)) {
                        switch($_COOKIE['VCLSKIN']) {
                                case 'EXAMPLE2':
                                        $skin = 'example2';
@@ -174,6 +170,12 @@ function initGlobals() {
                                        break;
                        }
                }
+               # set skin based on IP address, useful to ensure anyone coming
+               #   from a certain organization automatically gets a different 
skin
+               /*elseif(preg_match('/^152\.9\./', $_SERVER['REMOTE_ADDR']) ||
+                       (array_key_exists('VCLSKIN', $_COOKIE) && 
$_COOKIE['VCLSKIN'] == 'EXAMPLE1')) {
+                       $skin = 'example1';
+               }*/
                else
                        $skin = DEFAULTTHEME;
                if($mode != 'selectauth' && $mode != 'submitLogin')


Reply via email to