Skip to Content.
Sympa Menu

en - RE: [sympa-users] sympa_soap_client.pl and special characters

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Steve Shipway <address@concealed>
  • To: Alexander Bech <address@concealed>, "address@concealed" <address@concealed>
  • Subject: RE: [sympa-users] sympa_soap_client.pl and special characters
  • Date: Sun, 20 Dec 2015 23:30:40 +0000

Title: sympa_soap_client.pl and special characters

Ah… my patch is responsible for get/setCustom and get/setDetails in 6.1.x; they both made it into 6.2. The add function is part of the standard package of course.

 

They both call List::setXMLCustomAttribute to create the attribute, relying on the main SOAP parsing to provide the correct string, and so I expect that setDetails will also have the problem if you use it to set the attribute (you can pass additional key/value pairs to setDetails to do this).

 

The gecos setting by setDetails is done by calling List::update_user with the gecos value as passed.

The add call uses List::add_user to add the user (and gecos) value straight to the list.

 

None of these do anything special for MIME encoding; my only guess at the moment is that update_user handles 8bit chars better than add_user and setXMLCustomAttribute.  Checking the code in 6.1 seems to show they both only use $dbh->quote() so I’m not sure why one works and the other does not.

 

Under 6.2.12 things are done differently; as I only have 6.2.4 here I cannot make a meaningful test comparison.  6.2.12 appears to do special encoding for custom variables, so it may work better there.

 

I have run a quick test under 6.2.4 and the ‘add’ function and ‘setDetails’ both seem to set accented characters correctly.

 

Steve

 

Steve Shipway

T: +64 9 3737 599 ext 86487

E: address@concealed

(GNU Terry Pratchett)

 

From: address@concealed [mailto:address@concealed] On Behalf Of Alexander Bech
Sent: Saturday, 19 December 2015 10:34 a.m.
To: address@concealed
Subject: [sympa-users] sympa_soap_client.pl and special characters

 

Hi,

i wrote a bash script to add subscribers to a list from a csv-file.
Works fine with the commands add, setDetails and setCustom.

However, there is a problem with special characters such as "umlaut marks" with add and setCustom commands.

Soap-command add:

sympa_soap_client.pl --trusted_application=soapapp --trusted_application_password=...pwd --soap_url=http://listen.bakarasse.de/sympasoap --service=add
--address@concealed --service_parameters=test5,address@concealed,Jürgen\ Adrian

calling authenticateRemoteAppAndRun( soapapp, detailspwd, address@concealed,add,test5,address@concealed,Jürgen Adrian)

0
    ''

result: gecos is wrong
add



Soap-command setDetails:
 sympa_soap_client.pl --trusted_application=soapapp --trusted_application_password=...pwd --soap_url=http://listen.bakarasse.de/sympasoap --service=setDetails
--address@concealed --service_parameters=test5,Jürgen\ Adrian
calling authenticateRemoteAppAndRun( soapapp, detailspwd, address@concealed,setDetails,test5,Jürgen Adrian)
0
    '1'

result: gecos is correct
set-details



Soap-command setCustom - custom attribute "vorname":
 sympa_soap_client.pl --trusted_application=soapapp --trusted_application_password=...pwd --soap_url=http://listen.bakarasse.de/sympasoap --service=setCustom --address@concealed --service_parameters=test5,vorname,Jürgen
calling authenticateRemoteAppAndRun( soapapp, detailspwd, address@concealed,setCustom,test5,vorname,Jürgen)
0
    '1'
result: custom attribute is wrong
set-custom-vorname


Any help or hint?

Sympa version 6.1.23~dfsg-2, debian 8.2, sympasoap.pm with patch from http://steveshipway.org/software/f_sympa.html.


Thanks,
Alex

Attachment: smime.p7s
Description: S/MIME cryptographic signature




Archive powered by MHonArc 2.6.19+.

Top of Page