public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
* [git.ipfire.org] IPFire 2.x development tree branch, next, updated. b643120c014c7ece5d13587376bfc9f09b706b11
@ 2013-01-07 11:31 git
  0 siblings, 0 replies; only message in thread
From: git @ 2013-01-07 11:31 UTC (permalink / raw)
  To: ipfire-scm

[-- Attachment #1: Type: text/plain, Size: 2539 bytes --]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  b643120c014c7ece5d13587376bfc9f09b706b11 (commit)
      from  1d109fd2a63305c5ec3653bbb7888a2142aa744b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b643120c014c7ece5d13587376bfc9f09b706b11
Author: Alexander Marx <amarx(a)ipfire.org>
Date:   Mon Jan 7 08:46:42 2013 +0100

    OpenVPN CCD: Fix ccd filename when certificate has spaces in name. Now the filename gets an underscore to provide full functionality of openvpn.

-----------------------------------------------------------------------

Summary of changes:
 html/cgi-bin/ovpnmain.cgi    | 1 +
 src/scripts/ovpn-ccd-convert | 1 +
 2 files changed, 2 insertions(+)

Difference in files:
diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
index 6def979..b3c7b48 100755
--- a/html/cgi-bin/ovpnmain.cgi
+++ b/html/cgi-bin/ovpnmain.cgi
@@ -3980,6 +3980,7 @@ if ($cgiparams{'TYPE'} eq 'net') {
 			if ( -e "${General::swroot}/ovpn/ccd/$confighash{$key}[2]"){
 				unlink "${General::swroot}/ovpn/ccd/$cgiparams{'CERT_NAME'}";
 			}
+			$confighash{$key}[2] =~ s/ /_/gi;
 			open ( CCDRWCONF,'>',"${General::swroot}/ovpn/ccd/$confighash{$key}[2]") or die "Unable to create clientconfigfile $!";
 			print CCDRWCONF "# OpenVPN clientconfig from ccd extension by Copymaster#\n\n";
 			if($cgiparams{'CHECK1'} eq 'dynamic'){
diff --git a/src/scripts/ovpn-ccd-convert b/src/scripts/ovpn-ccd-convert
index ac76435..7aa8cf1 100644
--- a/src/scripts/ovpn-ccd-convert
+++ b/src/scripts/ovpn-ccd-convert
@@ -31,6 +31,7 @@ open(FILE,"/var/ipfire/ovpn/server.conf");
 &General::readhasharray("/var/ipfire/ovpn/ovpnconfig", \%ovpnconfig);
 foreach my $key (keys %ovpnconfig){
 	if($ovpnconfig{$key}[32] eq '' && $ovpnconfig{$key}[3] eq 'host'){
+		$ovpnconfig{$key}[2] =~ s/ /_/gi;
 		open ( CCDRWCONF,'>',"/var/ipfire/ovpn/ccd/$ovpnconfig{$key}[2]") or die "Unable to create clientconfigfile $!";
 		print CCDRWCONF "# OpenVPN Clientconfig from CCD extension by Copymaster#\n\n";
 		print CCDRWCONF "#This client uses the dynamic pool\n\n";


hooks/post-receive
--
IPFire 2.x development tree

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-07 11:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-07 11:31 [git.ipfire.org] IPFire 2.x development tree branch, next, updated. b643120c014c7ece5d13587376bfc9f09b706b11 git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox