Skip to content
This repository was archived by the owner on Jan 28, 2020. It is now read-only.

Commit 86333fa

Browse files
committed
Fix am_cache_env_fetch_first.
This function is supposed to return the value of the entry we are looking for, but instead it returned the name. Fix it to return the value. Also, fix exit condition on for-loop. This fixes NameID-based logout.
1 parent 7e8dc08 commit 86333fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

auth_mellon_cache.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -489,12 +489,12 @@ const char *am_cache_env_fetch_first(am_cache_entry_t *t,
489489
const char *str;
490490
int i;
491491

492-
for (i = 0; t->size; i++) {
492+
for (i = 0; i < t->size; i++) {
493493
str = am_cache_entry_get_string(t, &t->env[i].varname);
494494
if (str == NULL)
495495
break;
496496
if (strcmp(str, var) == 0)
497-
return str;
497+
return am_cache_entry_get_string(t, &t->env[i].value);
498498
}
499499

500500
return NULL;

0 commit comments

Comments
 (0)