From 60c8668aca0d596319ca02dcfbabde7028c9b572 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 8 Mar 2019 21:53:44 -0500 Subject: [PATCH] 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 --- mod/follow.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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');