diff options
Diffstat (limited to 'apps/contacts/ajax/deleteproperty.php')
-rw-r--r-- | apps/contacts/ajax/deleteproperty.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/contacts/ajax/deleteproperty.php b/apps/contacts/ajax/deleteproperty.php index d141cc00b8d..f73758a3676 100644 --- a/apps/contacts/ajax/deleteproperty.php +++ b/apps/contacts/ajax/deleteproperty.php @@ -48,6 +48,12 @@ if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){ exit(); } +// Check if the card is valid +if( !OC_Contacts_Addressbook::isValidVObject($card['carddata'])){ + echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Unable to parse vCard!')))); + exit(); +} + $vcard = Sabre_VObject_Reader::read($card['carddata']); $line = null; for($i=0;$i<count($vcard->children);$i++){ |