mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-05-28 04:03:29 -04:00
CC_PRINT character class now allows any 8-bit character value >= 32.
This is done to allow UTF-8 and restrict the use of control characters in usernames, passwords, common names, etc. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7538 e7ae566f-a301-0410-adde-c780ea21d3b5
This commit is contained in:
parent
a3beba0042
commit
2627335ac2
1 changed files with 1 additions and 1 deletions
2
buffer.c
2
buffer.c
|
|
@ -720,7 +720,7 @@ char_class (const unsigned char c, const unsigned int flags)
|
|||
return true;
|
||||
if ((flags & CC_DIGIT) && isdigit (c))
|
||||
return true;
|
||||
if ((flags & CC_PRINT) && (isprint (c) || c >= 0x7f)) /* allow UTF-8 */
|
||||
if ((flags & CC_PRINT) && (c >= 32)) /* allow ascii non-control and UTF-8 */
|
||||
return true;
|
||||
if ((flags & CC_PUNCT) && ispunct (c))
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue