mirror of
https://github.com/friendica/friendica
synced 2025-04-27 15:50:12 +00:00
Issue 9926: Limit the length of data to store in the apcontact table
This commit is contained in:
parent
87c1533516
commit
da8d5f5015
2 changed files with 8 additions and 0 deletions
|
@ -26,6 +26,7 @@ use Friendica\Core\Cache\Duration;
|
|||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBStructure;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Protocol\ActivityNamespace;
|
||||
|
@ -349,6 +350,9 @@ class APContact
|
|||
DBA::delete('apcontact', ['url' => $url]);
|
||||
}
|
||||
|
||||
// Limit the length on incoming fields
|
||||
$apcontact = DBStructure::getFieldsForTable('apcontact', $apcontact);
|
||||
|
||||
if (DBA::exists('apcontact', ['url' => $apcontact['url']])) {
|
||||
DBA::update('apcontact', $apcontact, ['url' => $apcontact['url']]);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue