Projects
Kolab:Winterfell
roundcubemail-plugins-kolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 6
View file
roundcubemail-plugins-kolab-3.3.tar.gz/plugins/libkolab/lib/kolab_storage_cache_contact.php
Changed
@@ -23,8 +23,9 @@ class kolab_storage_cache_contact extends kolab_storage_cache { - protected $extra_cols = array('type','name','firstname','surname','email'); - protected $binary_items = array( + protected $extra_cols_max = 255; + protected $extra_cols = array('type','name','firstname','surname','email'); + protected $binary_items = array( 'photo' => '|<photo><uri>[^;]+;base64,([^<]+)</uri></photo>|i', 'pgppublickey' => '|<key><uri>data:application/pgp-keys;base64,([^<]+)</uri></key>|i', 'pkcs7publickey' => '|<key><uri>data:application/pkcs7-mime;base64,([^<]+)</uri></key>|i', @@ -59,6 +60,13 @@ $sql_data['name'] = rcube_charset::clean($object['organization']); } + // make sure some data is not longer that database limit (#5291) + foreach ($this->extra_cols as $col) { + if (strlen($sql_data[$col]) > $this->extra_cols_max) { + $sql_data[$col] = rcube_charset::clean(substr($sql_data[$col], 0, $this->extra_cols_max)); + } + } + return $sql_data; } } \ No newline at end of file
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.