Properly check for user/REMOTE_USER combo.
authorScott Cantor <cantor.2@osu.edu>
Wed, 12 Apr 2006 15:48:15 +0000 (15:48 +0000)
committerScott Cantor <cantor.2@osu.edu>
Wed, 12 Apr 2006 15:48:15 +0000 (15:48 +0000)
xmlproviders/XMLAAP.cpp

index adc8a84..e8924b3 100644 (file)
@@ -184,10 +184,14 @@ void XMLAAPImpl::init()
             m_attrMap[key]=rule;
             m_attrs.push_back(rule);
             if (rule->getAlias()) {
-                if (!strcmp(rule->getAlias(),"user"))
+                // user can only apply to REMOTE_USER
+                if (!strcmp(rule->getAlias(),"user")) {
+                    if (strcmp(rule->getHeader(),"REMOTE_USER"))
+                        log.error("<AttributeRule> cannot specify Alias of 'user', please use alternate value");
+                }
+                else {
                     m_aliasMap[rule->getAlias()]=rule;
-                else
-                    log.error("<AttributeRule> cannot specify Alias of 'user', please use alternate value");
+                }
             }
         }
     }