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
This commit is contained in:
Hypolite Petovan 2019-03-08 21:53:44 -05:00
parent efdb6634a2
commit 60c8668aca

View File

@ -60,7 +60,11 @@ function follow_content(App $a)
} }
$uid = local_user(); $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'); $submit = L10n::t('Submit Request');