chore: merge style/189-fix-keep-me-logged-in-check into develop

This commit is contained in:
grandeljay 2023-12-21 12:39:20 +01:00
commit aa67224659
3 changed files with 5 additions and 2 deletions

View file

@ -29,7 +29,9 @@ switch ($_SERVER['REQUEST_METHOD']) {
}
} elseif (isset($_GET['wish_url'])) {
if (isset($_GET['isAffiliate'])) {
$response['isAffiliate'] = Wish::hasAffiliateLink($_GET['wish_url']);
$wishUrl = \base64_decode($_GET['wish_url']);
$response['isAffiliate'] = Wish::hasAffiliateLink($wishUrl);
} else {
$url = trim($_GET['wish_url']);
$cache = new Cache\Embed($url);

View file

@ -277,7 +277,7 @@ $(function () {
input.attr('disabled', 'disabled');
fetch('/index.php?page=api&module=wishes&wish_url=' + input.val() + '&isAffiliate', {
fetch('/index.php?page=api&module=wishes&wish_url=' + window.btoa(input.val()) + '&isAffiliate', {
'method' : 'GET',
'credentials' : 'include',
})

View file

@ -689,5 +689,6 @@ class User
}
$this->__construct($user);
$this->stayLoggedIn = true;
}
}