Merge pull request #11050 from MrPetovan/task/10990-api-photo-visibility

Prevent API-submitted public pictures to be published as statuses
This commit is contained in:
Tobias Diekershoff 2021-11-30 15:15:21 +01:00 committed by GitHub
commit f81742d1c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1333,7 +1333,9 @@ function api_fr_photo_create_update($type)
$deny_cid = $_REQUEST['deny_cid' ] ?? null;
$allow_gid = $_REQUEST['allow_gid'] ?? null;
$deny_gid = $_REQUEST['deny_gid' ] ?? null;
$visibility = !$allow_cid && !$deny_cid && !$allow_gid && !$deny_gid;
// Pictures uploaded via API never get posted as a visible status
// See https://github.com/friendica/friendica/issues/10990
$visibility = false;
// do several checks on input parameters
// we do not allow calls without album string