[PATCH nm-openconnect 2/3] Allow alphanumeric software token secrets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



RSA uses (mostly) purely numeric secrets, but other schemes may have
different requirements.

We will still strip out non-ASCII characters to avoid problems like
linefeeds showing up in the exported VPN configuration files.
---
 properties/nm-openconnect.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/properties/nm-openconnect.c b/properties/nm-openconnect.c
index 4e1e5ea..f7c43d8 100644
--- a/properties/nm-openconnect.c
+++ b/properties/nm-openconnect.c
@@ -577,7 +577,7 @@ update_connection (NMVpnPluginUiWidgetInterface *iface,
 
 		/* zap invalid characters */
 		for (; *src; src++)
-			if ((*src >= '0' && *src <= '9') || *src == '-')
+			if (*src >= ' ' && *src <= '~')
 				*(dst++) = *src;
 		*dst = 0;
 
-- 
1.7.10.4




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux