Skip to content

Commit

Permalink
Repairing BASE64 encoded vCard version 3
Browse files Browse the repository at this point in the history
Signed-off-by: Weby <weby@we-bb.com>
  • Loading branch information
Weby committed Dec 27, 2018
1 parent 84092d7 commit 6d8bfae
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sabre/vobject/lib/Property.php
Expand Up @@ -617,6 +617,18 @@ function validate($options = 0) {
break;
case Document::VCARD30 :
$allowedEncoding = ['B'];
//Repair vCard30 that use BASE64 encoding
if ($options & self::REPAIR) {
if ('BASE64' === strtoupper($encoding)) {
$encoding = 'B';
$this['ENCODING'] = $encoding;
$warnings[] = [
'level' => 1,
'message' => 'ENCODING=BASE64 has been transformed to ENCODING=B.',
'node' => $this,
];
}
}
break;

}
Expand Down

0 comments on commit 6d8bfae

Please sign in to comment.