diff options
author | James Yonan <james@openvpn.net> | 2011-08-19 03:10:08 +0000 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2011-08-24 13:34:26 +0200 |
commit | 2627335ac2605d0987a68ce97a0a2c4efbe25159 (patch) | |
tree | a5e4838bb83e3cb09b14bd9f419d49f51a1a7b9d /buffer.c | |
parent | a3beba0042312a479a706c34d977bb0944f824fd (diff) | |
download | openvpn-2627335ac2605d0987a68ce97a0a2c4efbe25159.tar.gz openvpn-2627335ac2605d0987a68ce97a0a2c4efbe25159.tar.xz openvpn-2627335ac2605d0987a68ce97a0a2c4efbe25159.zip |
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
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |