Skip to content

Commit

Permalink
Don't expose binary format in preauth otp
Browse files Browse the repository at this point in the history
ticket: 7417 (new)
target_version: 1.11
tags: pullup
  • Loading branch information
npmccallum authored and greghudson committed Oct 19, 2012
1 parent 4c1e02b commit f2a177d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/include/krb5/krb5.hin
Expand Up @@ -6408,7 +6408,6 @@ krb5_prompter_posix(krb5_context context, void *data, const char *name,
#define KRB5_RESPONDER_OTP_FORMAT_DECIMAL 0
#define KRB5_RESPONDER_OTP_FORMAT_HEXADECIMAL 1
#define KRB5_RESPONDER_OTP_FORMAT_ALPHANUMERIC 2
#define KRB5_RESPONDER_OTP_FORMAT_BINARY 3

/**
* This flag indicates that the token value MUST be collected.
Expand Down
3 changes: 2 additions & 1 deletion src/lib/krb5/krb/preauth_otp.c
Expand Up @@ -181,7 +181,8 @@ codec_encode_tokeninfo(krb5_otp_tokeninfo *ti, k5_json_object *out)
if (retval != 0)
goto error;

if (ti->format != KRB5_OTP_FORMAT_BASE64) {
if (ti->format != KRB5_OTP_FORMAT_BASE64 &&
ti->format != KRB5_OTP_FORMAT_BINARY) {
retval = codec_int32_to_value(ti->format, obj, "format");
if (retval != 0)
goto error;
Expand Down

0 comments on commit f2a177d

Please sign in to comment.