[sword-svn] r2434 - trunk/utilities/diatheke/tcl

chrislit at crosswire.org chrislit at crosswire.org
Thu Jun 4 02:59:29 MST 2009


Author: chrislit
Date: 2009-06-04 02:59:29 -0700 (Thu, 04 Jun 2009)
New Revision: 2434

Modified:
   trunk/utilities/diatheke/tcl/biblebot-diatheke.tcl
Log:
changed security regexes


Modified: trunk/utilities/diatheke/tcl/biblebot-diatheke.tcl
===================================================================
--- trunk/utilities/diatheke/tcl/biblebot-diatheke.tcl	2009-06-04 09:02:36 UTC (rev 2433)
+++ trunk/utilities/diatheke/tcl/biblebot-diatheke.tcl	2009-06-04 09:59:29 UTC (rev 2434)
@@ -38,7 +38,7 @@
     set vlookup [string trimleft $vlookup "@"]
     set vlookup [string trimleft $vlookup "#"]
 
-    regsub -all {[[]{};\#\%\\\$\'\"\/\|<>]} $vlookup { } vlookup
+    regsub -all {[\[\]\{\}\#\%\\\$\'\"\/\s]} $vlookup { } vlookup
     catch {exec $diatheke -f plaintext -o $arg -b $bibver -k "$vlookup" >& /tmp/fooout.$botnick}
     catch {set foofile [open /tmp/fooout.$botnick]}
     while {[gets $foofile fooverse] >= 0} {
@@ -74,7 +74,6 @@
     return 1
 }
 
-
 proc pub_lookup {nick uhost hand channel arg} {
     global von chan bibver
     set chan $channel
@@ -94,7 +93,7 @@
 
 proc pubsearchword {vlookup} {
     global botnick chan bibver diatheke
-    regsub -all {[[]{};\#\%\\\$\'\"\/\|<>]} $vlookup { } vlookup
+    regsub -all {[\[\]\{\}\#\%\\\$\'\"\/\s]} $vlookup { } vlookup
     catch {exec $diatheke -s $bibver "$vlookup" >& /tmp/fooout.$botnick}
     catch {set foofile [open /tmp/fooout.$botnick]}
 
@@ -122,7 +121,6 @@
     return 1
 }
 
-
 proc pub_lookups {nick uhost hand channel arg} {
     global von chan bibver
     set chan $channel
@@ -146,7 +144,7 @@
 
 proc publookupdict {vlookup} {
     global botnick chan bibver diatheke
-    regsub -all {[[]{};\#\%\\\$\'\"\/\|<>]} $vlookup { } vlookup
+    regsub -all {[\[\]\{\}\#\%\\\$\'\"\/\s]} $vlookup { } vlookup
     catch {exec $diatheke -f plaintext -b $bibver -k "$vlookup" >& /tmp/fooout.$botnick}
     catch {set foofile [open /tmp/fooout.$botnick]}
 
@@ -158,7 +156,6 @@
     return 1
 }
 
-
 proc pub_lookupd {nick uhost hand channel arg} {
     global von chan bibver
     set chan $channel
@@ -194,7 +191,7 @@
 
 proc publookupcomm {vlookup} {
     global botnick chan bibver diatheke
-    regsub -all {[[]{};\#\%\\\$\'\"\/\|<>]} $vlookup { } vlookup
+    regsub -all {[\[\]\{\}\#\%\\\$\'\"\/\s]} $vlookup { } vlookup
     catch {exec $diatheke -c $bibver "$vlookup" >& /tmp/fooout.$botnick}
     catch {set foofile [open /tmp/fooout.$botnick]}
     while {[gets $foofile fooverse] >= 0} {
@@ -225,7 +222,6 @@
     return 1
 }
 
-
 proc pub_lookupc {nick uhost hand channel arg} {
     global von chan bibver
     set chan $channel
@@ -265,7 +261,7 @@
 	return 0
     }
     
-    regsub -all {[[]{};\#\%\\\$\'\"\/\|<>]} $arg { } arg
+    regsub -all {[\[\]\{\}\#\%\\\$\'\"\/\s]} $arg { } arg
     catch {exec $dict "$arg" >& /tmp/fooout.$botnick}
     catch {set foofile [open /tmp/fooout.$botnick]}
     catch {set fooverse [gets $foofile]}




More information about the sword-cvs mailing list