From 479bfd0807fc1eaf895e694ee215e723ac07505f Mon Sep 17 00:00:00 2001 From: Jan Orel Date: Mon, 22 Aug 2022 11:10:56 +0200 Subject: [PATCH] B #5946: Fix parsing `*` in the group list (#2261) Regression introduced by68ce7dc0 With the addition to skipws, peek() will read the next whitespace in the buffer. The logic has been changed to use the extraction operator so ws are consumed. The peek - get is now changed by >> - unget calls --- src/um/UserPool.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/um/UserPool.cc b/src/um/UserPool.cc index 8d70748af6..faefb14ace 100644 --- a/src/um/UserPool.cc +++ b/src/um/UserPool.cc @@ -589,13 +589,18 @@ static int parse_auth_msg( int tmp_gid; bool gr_admin = false; - char c = is.peek(); + char c; + + is >> c; if ( c == '*' ) { - is.get(c); gr_admin = true; } + else + { + is.unget(); + } is >> tmp_gid;