Bug 106369

Summary: No fax sent when special characters are included in the sender information
Product: [Unmaintained] kdeprint Reporter: comet.friend
Component: kdeprintfaxAssignee: KDEPrint Devel Mailinglist <kde-print-devel>
Status: CLOSED FIXED    
Severity: normal CC: christian.schupfner, jlayt
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Slackware   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description comet.friend 2005-05-27 11:17:00 UTC
Version:            (using KDE KDE 3.3.2)
Installed from:    Slackware Packages
OS:                Linux

This bug is similar to, but not identical with #69263.

KDEprintfax 1.0 is unable to cope with spaces and special characters. When such characters are in the sender information, eg in the remarks/comments field, you either get an error message ("command not found", in the case of spaces) or the program starts to dial a number, just not the correct one. If you are unlucky the dialled number exists --- you get on the nerves of somebody else, and have to pay for the phone connection.

Why is this a problem?

Here is what I just had, and I think it's a pretty typical business scenario:

- I received a VCF contact from a communication partner
- I imported it into Kontact/Kaddressbook (KDE 3.3.2)
- In the right pane in the KDE addressbook I clicked on the hyperlink for the fax number that was included with the contact.
- As expected KDEprintfax was opened. The recipient data was filled with data from the address book.
- I attached a couple of files and clicked "send".
- My fax modem started to dial, connected to some telephone, but not a fax, and finally Hylafax sent me an error message, that it was unable to get the fax over.
- I double checked everything and found that the data that KDEprintfax had grabbed from the address book contained an email address.
- I removed the email address, and my fax was transmitted just fine.

Other than the poster of bug #69263 I don't think that preventing the entry of special characters in KDEprintfax will solve the problem. Even if you can't type them in the KDEprintfax dialog, you still can get them from the address book.

I think KDEprintfax should be able to cope with special characters, spaces, umlauts etc. If this is too difficult to be done quickly, I'd expect better error messages. At least, the text should be parsed before KDEprintfax starts to send a fax, and if there is any suspicious character, the user should be warned that KDEprintfax might take it as a command.

Thanks otherwise for the excellent work!
Comment 1 Cristian Tibirna 2005-08-22 21:25:47 UTC
UNCONFIRMED (batch reassigning messed this)
Comment 2 Cristian Tibirna 2005-09-27 14:10:49 UTC
*** Bug 113421 has been marked as a duplicate of this bug. ***
Comment 3 Cristian Tibirna 2006-04-22 15:17:24 UTC
SVN commit 532670 by tibirna:

allow for # (hash) characters in a fax number

allow passing the raw number to the commandline fax command

Both fixes courtesy of Ray Lischner. Thank you!

CCMAIL:rl.news@tempest-sw.com
BUG:106369


 M  +5 -3      faxctrl.cpp  


--- branches/KDE/3.5/kdebase/kdeprint/kdeprintfax/faxctrl.cpp #532669:532670
@@ -60,9 +60,9 @@
 	KConfig *conf = KGlobal::config();
 	conf->setGroup( "Personal" );
 
-	// removes any non-numeric character, except ('+','*') (hope it's supported by faxing tools)
+	// removes any non-numeric character, except ('+','*','#') (hope it's supported by faxing tools)
 	QString strip_s = s;
-	strip_s.replace( QRegExp( "[^\\d+*]" ), "" );
+	strip_s.replace( QRegExp( "[^\\d+*#]" ), "" );
 	if ( strip_s.find( '+' ) != -1 && conf->readBoolEntry( "ReplaceIntChar", false ) )
 		strip_s.replace( "+", conf->readEntry( "ReplaceIntCharVal" ) );
 	return strip_s;
@@ -253,6 +253,8 @@
 			// arguments
 			else if (isTag( match, "%number" ))
 				v = processTag( match, stripNumber( item.number) );
+			else if (isTag( match, "%rawnumber" ))
+				v = processTag( match, item.number );
 			else if (isTag( match, "%name" ))
 				v = processTag(match, item.name);
 			else if (isTag( match, "%comment" ))
@@ -395,7 +397,7 @@
 
 		addLogTitle( i18n( "Sending fax to %1 (%2)" ).arg( item.number ).arg( item.name ) );
 
-		QString cmd = replaceTags( m_command, tagList( 3, "%number", "%name", "%enterprise" ), NULL, item );
+		QString cmd = replaceTags( m_command, tagList( 4, "%number", "%name", "%enterprise", "%rawnumber" ), NULL, item );
 		m_process->clearArguments();
 		*m_process << cmd;
 		addLog(i18n("Sending to fax using: %1").arg(cmd));
Comment 4 John Layt 2008-12-31 18:35:12 UTC
Closing old Resolved status bug.