From: Hypolite Petovan Date: Sat, 9 Mar 2019 02:53:44 +0000 (-0500) Subject: Add defaults() to url parameter in mod/follow X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=60c8668aca0d596319ca02dcfbabde7028c9b572;p=friendica.git Add defaults() to url parameter in mod/follow - Add error redirection to /contact when url param is empty - Addresses part of https://github.com/friendica/friendica/issues/6338#issuecomment-470681556 --- diff --git a/mod/follow.php b/mod/follow.php index abde4abd03..404c79ea10 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -60,7 +60,11 @@ function follow_content(App $a) } $uid = local_user(); - $url = Strings::escapeTags(trim($_REQUEST['url'])); + $url = Strings::escapeTags(trim(defaults($_REQUEST, 'url', ''))); + + if (!$url) { + $a->internalRedirect($return_path); + } $submit = L10n::t('Submit Request');