1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2025-02-07 06:54:15 +01:00

increase title size to 4096, and cut title and description before writing to DB

This commit is contained in:
Arthur Schiwon 2016-08-06 01:10:10 +02:00
parent 1b93f9fe2d
commit fbf50e85a9
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
3 changed files with 6 additions and 2 deletions

View File

@ -27,7 +27,7 @@
<type>text</type>
<default></default>
<notnull>true</notnull>
<length>140</length>
<length>4096</length>
</field>
<field>
<name>user_id</name>

View File

@ -6,7 +6,7 @@
<licence>AGPL</licence>
<author>Arthur Schiwon, Marvin Thomas Rabe, Stefan Klemm</author>
<standalone/>
<version>0.8</version>
<version>0.8.1</version>
<documentation>
<user>https://doc.owncloud.org/server/9.0/user_manual/bookmarks.html</user>
</documentation>

View File

@ -434,6 +434,10 @@ class Bookmarks {
}
$enc_url_noprefix = htmlspecialchars_decode($url_without_prefix);
$enc_url = htmlspecialchars_decode($url);
$title = mb_substr($title, 0, 4096);
$description = mb_substr($description, 0, 4096);
// Change lastmodified date if the record if already exists
$sql = "SELECT * from `*PREFIX*bookmarks` WHERE `url` like ? AND `user_id` = ?";
$query = $db->prepareQuery($sql, 1);