From cf10a812dd65a086a91a02a163bbdc2844051816 Mon Sep 17 00:00:00 2001 From: gernot Date: Sun, 27 Apr 2003 12:41:38 +0000 Subject: [PATCH] - 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 --- scripts/capisuitefax.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/capisuitefax.in b/scripts/capisuitefax.in index 1bef5a1..0b44d40 100755 --- a/scripts/capisuitefax.in +++ b/scripts/capisuitefax.in @@ -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.")