mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-07 00:01:49 -04:00
parent
839951097c
commit
44870e5313
@ -153,7 +153,12 @@ METHOD(xauth_method_t, process, status_t,
|
|||||||
attr2string(user, sizeof(user), chunk);
|
attr2string(user, sizeof(user), chunk);
|
||||||
break;
|
break;
|
||||||
case XAUTH_USER_PASSWORD:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user