Infinite loop while checking for REMOTE_USER

Description

From Scott's mail:

shibsp/ServiceProvider.cpp on line 443:
while (matches.first != matches.second) {
const vector<string>& vals =
matches.first->second->getSerializedValues();
if (!vals.empty()) {
request.setRemoteUser(vals.front().c_str());
remoteUserSet = true;
break;
}
}

> That code is pretty obviously broken, though I'd have to analyze it a
little
> > to figure out when it actually spins.

To spin, it appears you'd have to have an Attribute used as REMOTE_USER that
ends up with no values after filtering. That's not meant to be possible, so
there's probably a bug somewhere else too, but the code wasn't written
properly anyway.

Description of consequences of the problem:
After some time all apache's processes cycle in this while loop. We hadn't
find a way how to reproduce this problem. We found some users which cause the
loop, but another login of the same user didn't cause the loop.

Environment

Debian 4.0

Activity

Show:

Scott Cantor June 23, 2009 at 12:47 PM

Closing after releases.

Scott Cantor March 3, 2009 at 1:17 PM
Edited

http://svn.middleware.georgetown.edu/view/cpp-sp?view=rev&revision=2944

Additional adjustment should prevent empty attributes in most cases, good enough since loop is fixed anyway.

Scott Cantor March 3, 2009 at 11:21 AM

The connector doesn't matter to the SP, it has no way to know about that.

Also, please provide any examples (filter policies, assertion traces) here in the bug entry.

Michal Prochazka March 3, 2009 at 10:50 AM

I should mention that I'm using SQL connector to resolve attributes.

Scott Cantor March 3, 2009 at 10:46 AM

http://svn.middleware.georgetown.edu/view/cpp-sp?view=rev&revision=2943

Leaving open until cause of empty attributes in cache is determined.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Created March 3, 2009 at 10:27 AM
Updated June 23, 2009 at 12:47 PM
Resolved March 3, 2009 at 1:17 PM