[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm

raeburn raeburn at source.lon-capa.org
Sat Jul 19 19:31:54 EDT 2014


raeburn		Sat Jul 19 23:31:54 2014 EDT

  Modified files:              
    /loncom/interface	domainprefs.pm 
  Log:
  reCAPTCHA
  - Keys from https://www.google.com/recaptcha/admin#createsite may contain '-'.
  
  
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.249 loncom/interface/domainprefs.pm:1.250
--- loncom/interface/domainprefs.pm:1.249	Tue Jul 15 21:51:47 2014
+++ loncom/interface/domainprefs.pm	Sat Jul 19 23:31:53 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.249 2014/07/15 21:51:47 raeburn Exp $
+# $Id: domainprefs.pm,v 1.250 2014/07/19 23:31:53 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -9076,8 +9076,8 @@
     if ($newsettings->{'captcha'} eq 'recaptcha') {
         $newpub = $env{'form.'.$container.'_recaptchapub'};
         $newpriv = $env{'form.'.$container.'_recaptchapriv'};
-        $newpub =~ s/\W//g;
-        $newpriv =~ s/\W//g;
+        $newpub =~ s/[^\w\-]//g;
+        $newpriv =~ s/[^\w\-]//g;
         $newsettings->{'recaptchakeys'} = {
                                              public  => $newpub,
                                              private => $newpriv,




More information about the LON-CAPA-cvs mailing list