Fix bug in parsing vCard data using PHP 7.3 due to an invalid regexp (#6744)

Looks like \R is not allowed in character class, but \r\n is fine.
On PHP 7.3.5 it throws warnings and empty result from preg_replace(),
though I couldn't reproduce.
pull/6748/head
Aleksander Machniak 5 years ago
parent f3d16240f2
commit fe90903fa1

@ -35,6 +35,7 @@ CHANGELOG Roundcube Webmail
- Fix bug where attachment preview didn't work with x_frame_options=deny (#6688)
- Fix so bin/install-jsdeps.sh returns error code on error (#6704)
- Fix bug where bmp images couldn't be displayed on some systems (#6728)
- Fix bug in parsing vCard data using PHP 7.3 due to an invalid regexp (#6744)
RELEASE 1.4-rc1
---------------

@ -538,8 +538,8 @@ class rcube_vcard
'/item(\d+)\.(TEL|EMAIL|URL)([^:]*?):(.*?)item\1.X-ABLabel:(?:_\$!<)?([\w() -]*)(?:>!\$_)?./si',
'/^item\d*\.X-AB.*$/mi', // remove cruft like item1.X-AB*
'/^item\d*\./mi', // remove item1.ADR instead of ADR
'/\n+/', // remove empty lines
'/^(N:[^;\R]*)$/m', // if N doesn't have any semicolons, add some
'/\n+/', // remove empty lines
'/^(N:[^;\r\n]*)$/m', // if N doesn't have any semicolons, add some
),
array(
'\2;type=\5\3:\4',

Loading…
Cancel
Save