Skip to content

Commit

Permalink
Set request->username and request->password fields to NULL if the req…
Browse files Browse the repository at this point in the history
…uest list is deleted
  • Loading branch information
arr2036 committed Feb 24, 2014
1 parent 0aa5b3d commit db4365c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/valuepair.c
Expand Up @@ -1151,6 +1151,12 @@ int radius_map2vp(VALUE_PAIR **out, REQUEST *request, value_pair_map_t const *ma

pairfree(from);

/* @fixme hacky! */
if (map->dst->list == PAIR_LIST_REQUEST) {
context->username = NULL;
context->password = NULL;
}

return 0;
}

Expand Down
5 changes: 5 additions & 0 deletions src/tests/keywords/update-delete
Expand Up @@ -33,3 +33,8 @@ if ((Tmp-String-0 && (Tmp-String-0 == 'foobarbaz')) || \
reply:Filter-Id := 'fail'
}
}

# This will of been removed too
update request {
User-Password := 'hello'
}

0 comments on commit db4365c

Please sign in to comment.