mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-06 00:00:47 -04:00
parent
839951097c
commit
44870e5313
@ -153,7 +153,12 @@ METHOD(xauth_method_t, process, status_t,
|
||||
attr2string(user, sizeof(user), chunk);
|
||||
break;
|
||||
case XAUTH_USER_PASSWORD:
|
||||
attr2string(pass, sizeof(pass), attr->get_chunk(attr));
|
||||
chunk = attr->get_chunk(attr);
|
||||
if (chunk.len && chunk.ptr[chunk.len - 1] == 0)
|
||||
{ /* fix null-terminated passwords (Android etc.) */
|
||||
chunk.len -= 1;
|
||||
}
|
||||
attr2string(pass, sizeof(pass), chunk);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user