mirror of
https://github.com/friendica/friendica
synced 2024-12-23 08:40:16 +00:00
Issue 14295: Store the return url as hex string
This commit is contained in:
parent
33e26b966e
commit
c42cff691a
4 changed files with 8 additions and 4 deletions
|
@ -868,7 +868,7 @@ class HTML
|
||||||
'$save_label' => $save_label,
|
'$save_label' => $save_label,
|
||||||
'$search_hint' => DI::l10n()->t('@name, !group, #tags, content'),
|
'$search_hint' => DI::l10n()->t('@name, !group, #tags, content'),
|
||||||
'$mode' => $mode,
|
'$mode' => $mode,
|
||||||
'$return_url' => urlencode(Search::getSearchPath($s)),
|
'$return_url' => bin2hex(Search::getSearchPath($s)),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!$aside) {
|
if (!$aside) {
|
||||||
|
|
|
@ -61,7 +61,7 @@ class SavedSearches
|
||||||
'$add' => '',
|
'$add' => '',
|
||||||
'$searchbox' => '',
|
'$searchbox' => '',
|
||||||
'$saved' => $saved,
|
'$saved' => $saved,
|
||||||
'$return_url' => urlencode($return_url),
|
'$return_url' => bin2hex($return_url),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ class Remove extends \Friendica\BaseModule
|
||||||
|
|
||||||
protected function content(array $request = []): string
|
protected function content(array $request = []): string
|
||||||
{
|
{
|
||||||
$returnUrl = $request['return'] ?? '';
|
$returnUrl = hex2bin($request['return'] ?? '');
|
||||||
|
|
||||||
if (!$this->session->getLocalUserId()) {
|
if (!$this->session->getLocalUserId()) {
|
||||||
$this->baseUrl->redirect($returnUrl);
|
$this->baseUrl->redirect($returnUrl);
|
||||||
|
|
|
@ -48,7 +48,11 @@ class Saved extends BaseModule
|
||||||
$action = $this->args->get(2, 'none');
|
$action = $this->args->get(2, 'none');
|
||||||
$search = trim(rawurldecode($_GET['term'] ?? ''));
|
$search = trim(rawurldecode($_GET['term'] ?? ''));
|
||||||
|
|
||||||
$return_url = $_GET['return_url'] ?? Search::getSearchPath($search);
|
if (!empty($_GET['return_url'])) {
|
||||||
|
$return_url = hex2bin($_GET['return_url']);
|
||||||
|
} else {
|
||||||
|
$return_url = Search::getSearchPath($search);
|
||||||
|
}
|
||||||
|
|
||||||
if (DI::userSession()->getLocalUserId() && $search) {
|
if (DI::userSession()->getLocalUserId() && $search) {
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
|
|
Loading…
Reference in a new issue