You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's unclear from the pam_get_item() documentation on what type of sanitation it does, so we can't be sure that it outputs valid strings.
So, add a wrapper function that fetches a var from pam_get_item(), copies it to a fixed-length buffer (1024 bytes should be enough for everyone!), and checks that there a no weird characters in there. At least remove ", {, and }, because they are sensitive for the output json.
The text was updated successfully, but these errors were encountered:
This is related to PR #103 ; sorry that I did not see this issue earlier.
PR #103 checks the input in a separate function input_is_safe(). This could also be done in a wrapper around tty_input() or in tty_input() itself, but it does not seem to be strictly necessary for group input since that is parsed by strtol() which already catches errors, and input_is_safe() can also be used on input from other sources, e.g. the username.
I see no remaining cases of user or system input that is not validated. There is also input from the web service, but that needs to be trustworthy anyway.
It's unclear from the
pam_get_item()
documentation on what type of sanitation it does, so we can't be sure that it outputs valid strings.So, add a wrapper function that fetches a var from
pam_get_item()
, copies it to a fixed-length buffer (1024 bytes should be enough for everyone!), and checks that there a no weird characters in there. At least remove"
,{
, and}
, because they are sensitive for the output json.The text was updated successfully, but these errors were encountered: