- filter out special characters from dialstring, fixes bug #17

thx to Achim Bohnet for reporting


git-svn-id: https://svn.ibp.de/svn/capisuite/trunk/capisuite@107 4ebea2bb-67d4-0310-8558-a5799e421b66
This commit is contained in:
gernot 2003-04-27 12:41:38 +00:00
parent 9bf6aa427a
commit cf10a812dd
1 changed files with 5 additions and 2 deletions

View File

@ -4,14 +4,14 @@
# ---------------------------------------------------
# copyright : (C) 2002 by Gernot Hillier
# email : gernot@hillier.de
# version : $Revision: 1.2 $
# version : $Revision: 1.3 $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
import getopt,os,sys,re,time,pwd,errno,fcntl
import getopt,os,sys,re,time,pwd,errno,fcntl,string
# capisuite stuff
import cs_helpers
@ -115,6 +115,9 @@ for option,param in optlist:
if option in ('-q','--quiet'): quiet=1
if (not abort and not listqueue and not dialstring):
usage("No usable command given.")
# filter out common separators from dialstring, check it
dialstring=dialstring.translate(string.maketrans("",""),"-/ ()")
for i in dialstring:
if ((i>'9' or i<'0') and i not in ('+')):
usage("Invalid dialstring given.")