Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash with contact name containing quote character #45

Open
pabs3 opened this issue Jul 11, 2010 · 0 comments
Open

crash with contact name containing quote character #45

pabs3 opened this issue Jul 11, 2010 · 0 comments

Comments

@pabs3
Copy link

pabs3 commented Jul 11, 2010

During the process of trying to get pisi to export my contacts I accidentally added a name field containing only a single quote character ('). This caused pisi to crash which it should not do, especially since there are legitimate names that contain quote characters.

Also, I'm a bit concerned that you are using exec since that could be a security concern (arbitrary Python code execution).

root@booph:~# pisi -v -m5 opimd vcf1


********************** PISI **********************


** PISI is synchronizing information ******************
** http://freshmeat.net/projects/pisiom ********


*************** PHASE 0 - Configuration ***************
Verbose mode on
In case of conflicts I use the following strategy: Manual confirmation
Reading configfile: /home/root/.pisi
contact opimd module loaded using file
contact VCF module loaded using file /home/root/contacts.vcf
Running in mode .
Source 1
Source 2
Pre-Processing Done

****************** PHASE 1 - Loading ******************
OPIMD: Loading
/usr/lib/python2.6/site-packages/dbus/connection.py:242: DeprecationWarning: object.init() takes no parameters
super(Connection, self).init(_args, *_kwargs)
VCF: Loading

***************** PHASE 2 - Comparing *****************

Module opimd has 20 contacts in total
Module vcf1 has 0 contacts in total

0 entries in common
0 entries with conflicts
20 entires in source 1 - but not in 2
0 entires in source 2 - but not in 1

****************** PHASE 3 - Saving ******************
Making changes permanent
OPIMD module: I apply 0 changes now
VCF module: I apply 20 changes now
adding or replacing @xxxx@@
adding or replacing @xxxx@@
adding or replacing @xxxx@@
adding or replacing @xxxx@@
adding or replacing @xxxx@@
adding or replacing @xxxx@@
adding or replacing @xxxx@@
adding or replacing @xxxx@@
adding or replacing @xxxx@@
adding or replacing @xxxx@@
adding or replacing @xxxx@@
adding or replacing @xxxx@@
adding or replacing @xxxx@@
adding or replacing @xxxx@@
adding or replacing @xxxx@@
adding or replacing @xxxx@@
Traceback (most recent call last):
File "/bin/pisi", line 153, in
pisicli.startCLI()
File "/opt/pisi/pisicli.py", line 255, in startCLI
pisi.applyChanges(source)
File "/opt/pisi/pisi.py", line 122, in applyChanges
source[1].saveModifications()
File "/opt/pisi/modules/contacts_vcf.py", line 158, in saveModifications
self._rawData[contactID] = createRawVcard(c)
File "/opt/pisi/vobjecttools.py", line 230, in createRawVcard
_createRawAttribute(c, j, 'fn', "'''" + fn + "'''")
File "/opt/pisi/vobjecttools.py", line 121, in _createRawAttribute
exec ("v =" + value)
File "", line 1
v ='''''''
^
SyntaxError: EOL while scanning string literal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant